Geek Help Samba through ssh

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • crokett
    The Full Monte
    • Jan 2003
    • 10627
    • Mebane, NC, USA.
    • Ryobi BT3000

    #1

    Geek Help Samba through ssh

    I have a need for Windows users to access a Samba share but I don't want to do it via straight Samba. I want to tunnel through ssh. I have a working ssh session from XP to Ubuntu and can tunnel a remote desktop through it. I can also tunnel the Samba share but when I enter the net use command in XP it fails on bad username or password. The same username/password work when I don't tunnel through ssh. I suspect it has something to do with the ssh encryption. My question is what log to check to help figure it out? syslog, auth and samba logs have bupkus.


    Ok maybe the tunnel is not working. I don't see any connection attempts being logged.
    Last edited by crokett; 02-04-2009, 07:49 PM.
    David

    The chief cause of failure in this life is giving up what you want most for what you want at the moment.
  • dbhost
    Slow and steady
    • Apr 2008
    • 9560
    • League City, Texas
    • Ryobi BT3100

    #2
    What errors are you getting in /var/log/messages and /var/log/secure?

    Depending on how big your log files get, you might want to do something like...

    # tac /var/log/messages | grep error (or fail) to look for login errors and failures.

    # tac /var/log/messages | grep refuse to look for refused connections

    If this was Red Hat / CentOS etc... I would look in /etc/hosts.allow and /etc/hosts.deny to see if you are denying them either directly or indirectly. Perhaps in /etc/sysconfig/iptables to see if you are blocking with iptables. I would have to look up how Debian type systems set up the config files, but I suspect they are in the same locations, or close...
    Please like and subscribe to my YouTube channel. Please check out and subscribe to my Workshop Blog.

    Comment

    • LinuxRandal
      Veteran Member
      • Feb 2005
      • 4890
      • Independence, MO, USA.
      • bt3100

      #3
      While I have never done (yet, or had need to) the ssh tunneling, let me ask that you don't overlook the obvious.

      When I set up Samba, initially, I forgot to share the folder and kept fighting with Samba setting thinking that was what I screwed up. Homer Simpson moment.
      She couldn't tell the difference between the escape pod, and the bathroom. We had to go back for her.........................Twice.

      Comment

      • sparkeyjames
        Veteran Member
        • Jan 2007
        • 1087
        • Redford MI.
        • Craftsman 21829

        #4
        Port 139 is probably already in use by windows netbios networking. In other words your connection is being intercepted by windows itself. You must disable netbios file and printer sharing on the windows machine in order to enable the use of port 139 by another separate program. This is just a guess after reading a few articles on samba and ssh connections. Are you using putty on the windows side for the ssh connection? If so read this....

        http://www.cs.toronto.edu/support/re...ows_samba.html
        Last edited by sparkeyjames; 02-04-2009, 11:20 PM.

        Comment

        • crokett
          The Full Monte
          • Jan 2003
          • 10627
          • Mebane, NC, USA.
          • Ryobi BT3000

          #5
          I got it. Thanks Sparky and LR. I overlooked the obvious. The HOW-TO includes instructions on using the loopback adapter for the tunnel but I was getting a bind error on port 139 when I tried to establish the tunnel. I disabled NetBIOS over TCP/IP for the loopback, the tunnel worked and the sharing works.
          Last edited by crokett; 02-05-2009, 08:10 AM.
          David

          The chief cause of failure in this life is giving up what you want most for what you want at the moment.

          Comment

          Working...