[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SSH Forwarding



I use this to create an ssh tunnel from work to home.
ssh -R 9999:Source IP address:Source port address
root@destination_IP_address -p port_through_firewall -C -N -f
At home now I can do "ssh -P 9999 localhost" and in reality it is my box
at work.

This looks like
ssh -R 9999:10.0.0.1:22 root@192.168.0.1 -p 23 -C -N -f
Reads like:
On my remote machine (192.168.0.1) create a listening port on 9999 that
will receive connections from my local machine (10.0.0.1) on port 22.
Connect my local machine (10.0.0.1) though port 23 (-p 23, I run ssh on
my telnet port on my remote machine since our corporate firewall does
not allow ssh but allows telnet ??). Compress my data (-C), do not
execute any remote commands (-N) and puts ssh in background AFTER it
asked for a password.

It's tricky but it works like a champ. -L reverses the the role; do some
magic localy and not remote (-R).

Hope this helps.

----- Original Message -----
From: "Geoff Sweet" <wayloud2@attbi.com>
To: <misc@openbsd.org>
Sent: Friday, March 01, 2002 11:02 PM
Subject: SSH Forwarding


> I have read heaps on the internet regarding TCP forwarding in SSH, but
> for the life of me I can't figure out what I need to set to make a
> particular SSH forward get created at boot time and stay that way.  I
> want to create a SSH forward for port 3389 so that I can safely
terminal
> serve into my domain.  I am currently operating OBSD 2.9.  Do I need
to
> modify the ssh_config file or the sshd_config file?  Or perhaps
> neither?  Thank you for you input.
>
> Geoff