Friday, August 11, 2006

SSH port forwarding on Unix/Linux

ssh -L your_client_ip_or_name:port1:destination_ip_or_name:22 proxy_ip_or_name -l username

your_client_id_or_name (The machine you want to start the connection to destination)
port1:whatever port in the client machine
destination_ip_or_name (the machine you want to connect to)
proxy_ip_or_name (The machine used as proxy, it is connectable to your_client and destination)

ssh -p port1 your_client_ip_or_name
this will connect you to destination

client -> client port 1 -> proxy -> destination

No comments: