Permanent SSH / Running SSH in Background

After searching and searching on google .. i haven’t see something that can fulfil my needs to create persistent SSH.

So .. i try to open ssh man page (ya ya ya .. i know .. I should open it 1st before searching anywhere) and got the option,

so what you need to do only :

- running it in background

- send all the log to /dev/null –> in my case, i never interested to see SSH log hihihihi

- create a tunnel

and from above requirement here it is the command :

ssh -T -f -N -L source_port:target_ip_tunnel:target_port username@host -p ssh_port

Note : (-p ssh_port) is optional if your default ssh port not 22.

That’s all folks !!

Advertisement

About superpinjal
Easy going .. but always take everything seriously especially when it's related with work stuff and side job stuff. Canon SLR and Lens, Telco industry are become 2 thing surrounded.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.