View previous topic :: View next topic |
Author |
Message |
knifeyspoony n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Jun 2005 Posts: 70
|
Posted: Fri Jul 27, 2007 5:58 pm Post subject: SSH tunnel, "connection refused" (SOLVED) |
|
|
Hi,
On the client side, I'm using OpenSSH under Cygwin. I issue ssh -f -N -L 23900:remotehost.com:23900 remotehost.com. I successfully authenticate on my Gentoo server machine. But when I try to use the forwarded connection at localhost 23900, I get "connection refused".
I've verified that the server process is running and listening on 23900. I am able to connect to the server from the Gentoo terminal. My sshd_config has AllowTcpForwarding and GatewayPorts set to "yes". I don't have a firewall running on the server side, unless it's part of Gentoo's default installation. (iptables certainly isn't running.) tcpdump confirms that the traffic is reaching Gentoo.
What could be the problem here? Would the router that's on my server's network be an issue?
Thanks.
Last edited by knifeyspoony on Fri Jul 27, 2007 9:46 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Voltago Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/5021960813fd4cfeb02cbe.jpg)
Joined: 02 Sep 2003 Posts: 2593 Location: userland
|
Posted: Fri Jul 27, 2007 6:04 pm Post subject: |
|
|
To what ip address does localhost resolve to? In other words, does 127.0.0.1:23900 work? Perhaps leave out the '-f' option to prevent the forking of ssh into the background to get some feedback about what is wrong. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
knifeyspoony n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Jun 2005 Posts: 70
|
Posted: Fri Jul 27, 2007 9:11 pm Post subject: |
|
|
Thanks for the reply, but it seems pretty clear to me that if anything of interest is happening it's happening on the server side. The connection request is reaching the server and the server is rejecting it.
If the rejection is logged on the server side, I don't see where. There's no filename containing "ssh" in /var/log, and sshd isn't printing anything to 'messages'. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Rob1n l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 29 Nov 2003 Posts: 714 Location: Cambridge, UK
|
Posted: Fri Jul 27, 2007 9:39 pm Post subject: |
|
|
Have you tried doing the tunnel as:
Quote: |
ssh -f -N -L 23900:localhost:23900 remotehost.com
|
It may be that your server process is only listening on localhost (or has some sort of access restrictions). |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
knifeyspoony n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Jun 2005 Posts: 70
|
Posted: Fri Jul 27, 2007 9:46 pm Post subject: |
|
|
Brilliant, thank you. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|