loging in to a LAN computer via ssh

François Patte francois.patte at math-info.univ-paris5.fr
Fri Aug 4 08:09:52 UTC 2006


Przemyslaw Gawronski a écrit :
>>>ssh -f root at gateway "ssh root at 192.168.0.10"

If you use iptables as firewall, add this rule:

/sbin/iptables -t nat -A PREROUTING -p tcp -s xxx.yyy.zzz.ttt --dport \
10022 -j DNAT --to-destination 192.168.0.10:22

the instruction -p tcp -s xxx.yyy.zzz.ttt is not necessary, it is only
if you allow a given machine to log on your gateway.

You can add in your .ssh/config file:

Host name-of-machine-behind-gw
        HostName  name-of-gateway
        HostKeyAlias name-of-machine-behind-gw
        Port 10022

and just type ssh me at name-of-machine-behind-gw

-- 
François Patte
UFR de mathématiques et informatique
Université Paris 5 - Paris
http://www.math-info.univ-paris5.fr/~patte




More information about the fedora-list mailing list