LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-10-2008, 02:52 AM   #1
TL_CLD
Member
 
Registered: Sep 2006
Posts: 355

Rep: Reputation: 35
SSH weirdness [SOLVED]


-- UPDATE --

Yes, well.. Ahem. The problem have been solved. It was a renegade /etc/hosts file with some wrong data in it.

Amazing to think how many hours I've "wasted" tracking down such a minor thing. LOL

-- END OF UPDATE --

Hey guys,

I'm having some weird SSH tunneling issues.

The setup:

1 Slackware 12.0 client
2 Slackware 11.0 servers

The goal:

Forward port 445 via an SSH tunnel from client to server. Basically I need to be able to use mount.cifs on an external server over WAN.

The "weirdness" stems from the fact that this works flawlessly connecting to server1, but it craps out on me on server2. The two servers are identical, insofar as they are running with the same sshd_config (ports are different though) and the same smb.conf.

When creating the tunnel, I do this for server1:
Code:
ssh -fNL 445:server1:445 root@server1 -p 2201 -vvv
and this for server2:
Code:
ssh -fNL 445:server2:445 root@server2 -p 2202 -vvv
The -vvv setting is only there for debugging purposes.

After having created the tunnel to server1, I can run smbclient on the client, and I'm then greeted with a nice list of all the samba shares on server1. I can mount the shares using mount.cifs and all is well.

Doing the same with server2 yields this output:
Code:
debug1: Connection to port 445 forwarding to server2 port 445 requested.
debug2: fd 6 setting TCP_NODELAY
debug2: fd 6 setting O_NONBLOCK
debug3: fd 6 is O_NONBLOCK
debug1: channel 2: new [direct-tcpip]
channel 2: open failed: connect failed: No route to host
debug1: channel 2: free: direct-tcpip: listening port 445 for server2 port 445, connect from 127.0.0.1 port 47823, nchannels 3
debug3: channel 2: status: The following connections are open:
  #2 direct-tcpip: listening port 445 for server2 port 445, connect from 127.0.0.1 port 47823 (t3 r-1 i0/0 o0/0 fd 6/6 cfd -1)

debug3: channel 2: close_fds r 6 w 6 e -1 c -1
On the server, in /var/log/syslog, I get this:
Code:
Sep 10 08:26:59 server sshd[9705]: error: connect_to server port 445: failed.
At first I thought I might've had some sort of firewall problem, but this happens even when I'm creating the tunnel from the same LAN as server2, ie. no firewalls between the client and the server. And yes, doing a regular smbclient -L server2 --user=SomeUser does indeed result in a nice long list of samba shares. Samba is running and working as intended. Server2 is currently hosting files for some 20 local (same LAN as server) clients.

What am I missing here?

The first thing I did was getting rid of the sshd_config file on server2 and replacing it with a copy of the one from server1. The only thing I've changed is the port. I then stopped/started SSHD on server2 and hoped for the best. Obviously my hopes were crushed.

Then I compared the two smb.conf files, but besides having different shares setup, they are also the same.

Both server1 and server2 are sitting behind a monowall firewall, and I can SSH into both machines using both keys and passwords. It's also worth noting that both tunnels are created without errors, it's only the connection to port 445 that fails on server2.

I'm at a loss here. Anybody got any ideas?

All involved machines are running with the latest official updates installed.

/Thomas

Last edited by TL_CLD; 09-10-2008 at 04:51 AM.
 
Old 09-10-2008, 10:26 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Fedora, Gentoo, Ubuntu (all servers at work are openSUSE)
Posts: 6,931

Rep: Reputation: 128Reputation: 128
I didn't read your thread after you put [SOLVED]. Glad you did fix
it, and added that to your post. You're now off Zero Replies, also.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 03:50 AM
ssh login weirdness kav Linux - Networking 10 12-26-2006 06:59 AM
SSH weirdness sardaukar_siet Linux - Networking 2 11-07-2006 04:31 PM
Undef handle weirdness in Net::SSH::Perl PenguinPwrdBox Programming 0 07-11-2006 02:11 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 01:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration