[Samba] Re: Virtual network using ssh tunneling on Windows 2K/XP.Please help.

Tom Schaefer tom at umsl.edu
Thu Feb 12 19:40:51 GMT 2004

Win 2K to a samba server through a secure shell tunnel definately works. 
There's a binary distribution of OpenSSH compiled for Win32 which is what
I use.  Hunt with Google a minute or two and you should be able to locate

Make sure you have any file and printer sharing disabled on the Win2K box
otherwise Win2K will already have port 139 tied up.

I use this command line on the Win 2K box where myserver.foo.bar is the
samba server...

ssh -N -L139:myserver.foo.bar:139 -l myusername myserver.foo.bar

Login with ssh and then \\\sharename like you are doing
ought to work, or what I do is put an entry in
c:\winnt\system32\drivers\etc\lmhosts like...


And then you can get to it as \\myservername\sharename

Tom Schaefer
Information Technology Services
University of Missouri Saint Louis

On Mon, 9 Feb 2004 09:06:19 -0000
"Paul Gardiner" <samba-list at laser-point.co.uk> wrote:

> From: "Paul Gardiner" <samba-list at laser-point.co.uk>
> > From: "Jérôme Fenal" <jerome.fenal at logicacmg.com>
> > > Paul Gardiner wrote:
> > > > Hi,
> > > > I'm trying to connect to a samba server via an ssh tunnel.  I'm
running> > > > ssh on my W2K machine.  If I try to connect from another
machine that> > > > is running an OS called RiscOS and a NetBIOS client
called LanMan98> > > > then it works perfectly, but if I try to connect
from the another Windows> > > > machine running XP, or from the W2k
machine (uisng loopback), I get> > > >
> > > > "Windows cannot find \\\sharename.  Check the spelling
and try again,> > > > or try searching for the item by clicking the Start
button and then clicking> > > > Search."
> > > >
> > > > I've found claims on the net of this working.  So what am I doing
wrong> > > > (other than using Windows in the first place :-) )?
> > >
> > > What are ports that you tunnel with SSH ?
> > > Did you forget to tunnel 445 ?
> >
> > I did, but I've added it now, and I'm still getting the same error
message.  I> > also tried forwarding 138 and 137, with no effect.
> >
> > Any other ideas?
> >
> >
> > BTW, to forward 445, I had to stop W2K binding it, but I found info on
> > a registry change that did the job.
> I'm still getting nowhere with this.  Its strange: I can get LanMan98
(under RiscOS)> and smbmount (under Linux) to mount this share via the ssh
tunnel with only port 139> forwared, but I can't find a way to tell
Windows XP to just use port 139.> 
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba

More information about the samba mailing list