SSH Tunnel in the Background

Use this to make a SSH tunnel in the background:


# nohup ssh -f -N -L 81:target.example.com:81 jumphost.example.com

nohup makes the thing go away in the background
-f makes SSH run in the background
-N tells SSH that it should not expect any command
-L tells SSH to do port forward. 
The first is the local port number to forward, on this machine.
The second is the machine to forward to.
The third is the destination port on the target machine.

The last hostname is the machine we use to jump through. (Exit node)

Actually, nohup is not all that necessary.
Dette indlæg blev udgivet i Knowledge Base, SSH. Bogmærk permalinket.

Skriv et svar