lunedì 29 ottobre 2007

ssh tunneling to CERN

Two methods can be used:

1. modify ssh client configuration file
.ssh/config

#
#Usage:
#ssh -N -f -q lxtunnel; ssh pccmsto02

Host lxtunnel
HostName lxplus.cern.ch
User argiro
LocalForward 7777 pccmsto02.cern.ch:22
LocalForward 7778 pccmsto03.cern.ch:22
LocalForward 7779 lxcmsf3.cern.ch:22

Host pccmsto02.cern.ch
HostName localhost
User argiro
Port 7777


Host pccmsto03.cern.ch
HostName localhost
User argiro
Port 7778


Host lxcmsf3.cern.ch
HostName localhost
User argiro
Port 7779

then do :

ssh -Nfq lxtunnel this opens the tunnel

then you can normally ssh to lxcmsf3, or the other machines you have configured

2. Manual tunneling

ssh -L 7777:lxcmsf3.cern.ch:22 lxplus.cern.ch

meaning "forward requests to localhost:7777 to lxcmsf3".
In another window do

ssh -p7777 localhost

Nessun commento: