On 12/15/06, Sonia Hamilton <[EMAIL PROTECTED]> wrote:
Is there a way of configuring ssh, so that if someone ssh's into my
machine, I can connect back and get into their machine? (Linux to
Linux).
Reason: I'm going to convert my dad's pc to Ubuntu (he's shipping it to
me), I'm having trouble connecting thru the Hel$tra network and his ADSL
modem. But if I could get him to ssh to me and I could get back in...
(today I spent 3 hours on voip with him, trying to remote desktop into
his 'doze box. It took that long just to get port 22 & 3389 forwarded
on the modem, dyndns config'd and him setup with an a/c on 'doze
messenger. Couldn't tcptraceroute him on 22 or 3389 tho. Oh the
pain....).
Sure, you can forward ports in both directions with ssh.
A simple example is:
ssh -R 5522:127.0.0.1:22 [EMAIL PROTECTED]
This would forward all connections from the remote computer's port of
5522, to 127.0.0.1:22
You may have trouble binding to ports 1024 or lower on the other side
(which is why I used 5522 as an example), and you may have to enable
an option in the sshd config of the other side.
For more information see the man page at
http://www.openbsd.org/cgi-bin/man.cgi?query=ssh
An alternative approach is to setup a VPN, I recommend either OpenVPN
(http://openvpn.net/) which is open source, or hamachi
(http://hamachi.cc/) which is not, but runs on Linux.
Hamachi is quite trivial to setup compared to OpenVPN, but OpenVPN
isn't too bad if you follow a howto. OpenVPN should also be in most
distributions' package repositories.
I used to run an OpenVPN network between all my machines, and a few
friends, but I've since moved to hamachi because it's easier for most
of my friends to use, and I saw to point in maintaining two VPNs.
Hope some of this info helps. :)
-Michael
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html