View Single Post
  #4  
Old 18th September 2008, 16:39
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts
Default

Okay this is how u do it, you can create a config file ~/.ssh/config

Code:
Host firewall
Hostname firewall_ip_address
Localforward 2222 host_behind_firewall:22
Then ssh firewall, this will create a socket bound to localhost port 2222

When you
Code:
ssh -P 2222 localhost
You will be sent to the machine behind the firewall then u can run the commands on it.

Or you can do it on the command line ssh firewall -L 2222 host_behind_firewall_ip:22
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote