[linux-cifs-client] Mount over SSH tunnel

cifs.20.DrLock at spamgourmet.com cifs.20.DrLock at spamgourmet.com
Fri Sep 12 18:24:40 GMT 2008


Thanks that is exactly what I needed.
Port 445 allows me to mount the Samba share. Interestingly smbclient doesn't
work on port 445, but that is fine, I can tunnel 139 if I need smbclient.

Thanks for your help.
   Daniel

On Fri, Sep 12, 2008 at 8:26 AM, Jeff Layton - jlayton at redhat.com
<+cifs+drlock+d6d9033095.jlayton#redhat.com at spamgourmet.com> wrote:

> On Wed, 10 Sep 2008 11:25:15 -0400
> cifs.20.DrLock at spamgourmet.com wrote:
>
> > I am trying to pass a samba mount through an SSH tunnel to my file
> > server. The basic setup is:
> >
> > Linux Client -- |Firewall| -- Windows File Server
> >
> > The Windows File Server is running OpenSSH for Windows (BTW freeSSHd
> > has a tunneling bug and won't work) and can accept tunnels and local
> > forwarding.
> > I can create the tunnel, I can even browse the file server with
> > smbclient, but I can't get it to mount the samba share. My slightly
> > modified terminal session is:
> >   myuser at linuxclient:~$ ssh -N -f -L 20139:10.0.0.1:139 magni.domain.com
> >   myuser at magni.domain.com's password:
>
> Most modern SMB servers use port 445. Try changing your setup to use
> that instead.
>
> >   myuser at linuxclient:~$ smbclient //magni/backups -p 20139 -U myuser
> > -I 127.0.0.1
> >   Password:
> >   Domain=[MAGNI] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
> >   smb: \> ls
> >   . D 0 Fri Dec 22 11:16:38 2006
> >   .. D 0 Fri Dec 22 11:16:38 2006
> >   .Trash-myuser DH 0 Mon Feb 26 15:31:21 2007
> >
> >   48618 blocks of size 4194304. 9347 blocks available
> >   smb: \> exit
> >   myuser at linuxclient:~$ sudo mount -t smbfs //magni/backups /mnt/bak/
> > -o port=20139,ip=127.0.0.1,username=myuser
> >   Password:
> >   mount error 112 = Host is down
> >   Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
> >
> > 10.0.0.1 is a loopback device on the Windows file server
> >
> > Why can't CIFS talk to the host when smbclient can? This does not seem
> > to be a new problem. I have found many other people with the same
> > issue:
> >
> http://lists.samba.org/archive/linux-cifs-client/2006-November/001594.html
> >
> http://lists.samba.org/archive/linux-cifs-client/2004-September/000379.html
> >
> > But I haven't found any solutions. Any ideas would be appreciated.
> >
> > Thanks
> > _______________________________________________
> > linux-cifs-client mailing list
> > linux-cifs-client at lists.samba.org
> > https://lists.samba.org/mailman/listinfo/linux-cifs-client
> >
>
>
> --
> Jeff Layton <jlayton at redhat.com>
>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the linux-cifs-client mailing list