View previous topic :: View next topic |
Author |
Message |
djco Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
Joined: 29 Mar 2003 Posts: 67 Location: 52.36, 4.89
|
Posted: Mon Oct 15, 2007 7:26 am Post subject: Remote SSH forwarding won't work |
|
|
I want to be able to login to a NATted box at work from home, so I wanted to do remote SSH forwarding, like this:
ssh -N -R 2222:localhost:22 example.com
But when I login to example.com and try to login to the work box, it won't work:
djc@enrai ~ $ ssh -vvv 127.0.0.1:2222
OpenSSH_4.7p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
ssh: 127.0.0.1:2222: Name or service not known
djc@enrai ~ $ netstat -a
tcp 0 0 enrai.xavamedia.nl:2222 *:* LISTEN
So why isn't this working? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
merlijn Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/31241856446612562d1eda.jpg)
Joined: 10 Apr 2007 Posts: 161 Location: Den Haag, Holland
|
Posted: Mon Oct 15, 2007 9:57 am Post subject: |
|
|
This should work just fine if you have port 2222 forwarded to this box after the NAT.
However what I think is going wrong now, port 2222 is listening on the eth0 interface (enrai.xavamedia.nl), so you can't address that by using 127.0.0.1, you can see if it works by connecting to the lan ip of this box.
Hope this helps, _________________ Gigabyte G33-DS3R, E6850, 4gb ddr2-800, 8800GT, Acer AL2623W - amd64
MacBookPro 2.4ghz, 2gb ddr2-667 - ~x86
Code: | ROOT="/mnt/coffeecup/" USE="sugar extra-sugar milk" emerge --update --deep --verbose --oneshot coffee |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
JeliJami Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/148526789243d7753a09b11.jpg)
Joined: 17 Jan 2006 Posts: 1086 Location: Belgium
|
Posted: Mon Oct 15, 2007 11:30 am Post subject: Re: Remote SSH forwarding won't work |
|
|
Manuzhai wrote: | ...
ssh: 127.0.0.1:2222: Name or service not known
|
to connect on a different port, use -p <port>:
Code: | ssh -p 2222 127.0.0.1 |
_________________ Unanswered Post Initiative | Search | FAQ
Former username: davjel |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
djco Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
Joined: 29 Mar 2003 Posts: 67 Location: 52.36, 4.89
|
Posted: Fri Oct 19, 2007 7:02 am Post subject: Re: Remote SSH forwarding won't work |
|
|
davjel wrote: | Manuzhai wrote: | ...
ssh: 127.0.0.1:2222: Name or service not known
|
to connect on a different port, use -p <port>:
Code: | ssh -p 2222 127.0.0.1 |
| I guess that was it. Blegh, sorry for the noise. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|