Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSH tunnel, "connection refused" (SOLVED)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
knifeyspoony
n00b
n00b


Joined: 01 Jun 2005
Posts: 70

PostPosted: Fri Jul 27, 2007 5:58 pm    Post subject: SSH tunnel, "connection refused" (SOLVED) Reply with quote

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
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Fri Jul 27, 2007 6:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
knifeyspoony
n00b
n00b


Joined: 01 Jun 2005
Posts: 70

PostPosted: Fri Jul 27, 2007 9:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
Rob1n
l33t
l33t


Joined: 29 Nov 2003
Posts: 714
Location: Cambridge, UK

PostPosted: Fri Jul 27, 2007 9:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
knifeyspoony
n00b
n00b


Joined: 01 Jun 2005
Posts: 70

PostPosted: Fri Jul 27, 2007 9:46 pm    Post subject: Reply with quote

Brilliant, thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum