I got some help from the linux-cifs-client mailing list. So for those who may need it, here is my final solution:
The key is to use port 445. Then mounting works a lot smoother (notably smbclient no longer works).
To make things easier add something like the following to your ~/.ssh/config
Code:
Host server
HostName server.domain.com
User username
LocalForward 20445 10.0.0.1:445
Note that 10.0.0.1 has to be setup as a loop back device on the Windows file server.
Now you can create the tunnel to the Windows machine with
By the way, this tunnel will run on forever in the background unless you kill it or reboot. Have a look here for more details.
Now we can setup fstab to make mounting easier:
Code:
//server.domain.com/share /mnt/bak smbfs rw,user,credentials=/credentials/path,uid=user,gid=group,file_mode=0664,dir_mode=0775,port=20445,ip=127.0.0.1 0 0
And finally mount the share with
Code:
sudo mount /mnt/bak
Hope that is a help to others
Bookmarks