[OT] ssh tunnels? use -R

Styma, Robert E (Robert) stymar at lucent.com
Fri May 19 14:08:05 UTC 2006

> Chasecreek Systemhouse wrote:
> > Somewhat OT but I haven't been able to help myself with SSH 
> Tunneling;
> > please excuse.
> > 
> > What syntax should I use to be able to forward an SSH tunnel between
> > two servers -- I want to have a console login banner 
> available from my
> > work machine on my home machine;  I have access to ssh to my home
> > machine from work but not the reverse.
> Make sure you leave home machine on when you go to work.
> work# ssh -R 55022:localhost:22 me at homepc
> and pw.
>  >go home :)
> home# ssh -p 55022 me at localhost
> Now you just need to adjust the sshd.conf so that it won't time out 
> before you get home ;)
 nohup ssh  -R 55022:localhost:22 -N -f me at homepc &

will make the ssh connection stand alone after you log
off.  Actually, I wrote a program which runs off of
cron which keeps such a connection up.
has a download of the source to the program.  (C code)
Bob Styma

More information about the test mailing list