Mailinglist Archive: opensuse (4600 mails)

< Previous Next >
SSH Tunneling, open failed: connect failed: Connection refused
  • From: Jason Joines <joines@xxxxxxxxxxxxxxx>
  • Date: Wed, 21 Jan 2004 14:11:47 -0600
  • Message-id: <400EDD03.9020607@xxxxxxxxxxxxxxx>
I'm trying to figure out how to tunnel SMB over SSH. I found some documentation on the web and have tried it.

The command
'ssh -A -N -f -L 445:localhost:445 username@remotehost'
prompts me for my password and establishes a connection as expected.

First I connect directly to my home share on the remote host to make sure it is working via
'smbclient //remotehost/username -p 445 -U username

Then I try to connect via the tunnel as:
'smbclient //localhost/username -p 445 -U username'

and get this on the client
debug1: Connection to port 445 forwarding to localhost port 445 requested.
debug2: fd 6 setting TCP_NODELAY
debug2: fd 6 setting O_NONBLOCK
debug2: fd 6 is O_NONBLOCK
debug1: channel 2: new [direct-tcpip]
channel 2: open failed: connect failed: Connection refused
debug1: channel 2: free: direct-tcpip: listening port 445 for localhost port 445, connect from 127.0.0.1 port 36153, nchannels 3
debug3: channel 2: status: The following connections are open:
#2 direct-tcpip: listening port 445 for localhost port 445, connect from 127.0.0.1 port 36153 (t3 r-1 i0/0 o0/0 fd 6/6)
debug3: channel 2: close_fds r 6 w 6 e -1
protocol negotiation failed

on the server side I get
Jan 21 13:45:07 remotehost sshd[8467]: debug1: server_input_channel_open: ctype direct-tcpip rchan 2 win 131072 max 32768
Jan 21 13:45:07 remotehost sshd[8467]: debug1: server_request_direct_tcpip: originator 127.0.0.1 port 36153, target localhost port 445
Jan 21 13:45:07 remotehost sshd[8467]: debug1: fd 9 setting TCP_NODELAY
Jan 21 13:45:07 remotehost sshd[8467]: debug2: fd 9 is O_NONBLOCK
Jan 21 13:45:07 remotehost sshd[8467]: debug2: fd 9 is O_NONBLOCK
Jan 21 13:45:07 remotehost sshd[8467]: debug1: channel 0: new [direct-tcpip]
Jan 21 13:45:07 remotehost sshd[8467]: debug1: server_input_channel_open: confirm direct-tcpip
Jan 21 13:45:07 remotehost sshd[8467]: debug3: channel 0: waiting for connection
Jan 21 13:45:07 remotehost sshd[8467]: debug1: channel 0: not connected: Connection refused
Jan 21 13:45:07 remotehost sshd[8467]: debug1: channel 0: zombie
Jan 21 13:45:07 remotehost sshd[8467]: debug1: channel 0: garbage collecting

Each time, I've tried this stuff, I've taken down the firewall on both ends just to make sure that's not the problem. I can connect on remotehost using 'smbclient //localhost/username -p 445 -U username' just fine. I've tried a variety of SuSE and OpenSSH versions on each end 9.0 w/ 3.4p1, 8.2 w/ 3.5p1, 8.1 w/ 3.4p1, 8.0 w/ 3.4p1.

Any ideas?

Thanks,

Jason Joines
Open Source = Open Mind
========================

< Previous Next >
Follow Ups