header image
Home arrow Samba over SSH
How I Setup Samba SSH Tunnel PDF Print

The mission:  I want to be able to access files on the cia.crra.org.nz machine from my home network using windows so I can edit html in Frontpage 2000.

Talking with Clug and Tusker, I'm told the best thing to do is smb over ssh.

The Setup 

I'm running samba on cia.crra.org.nz

 

The Process
So, following the instructions at:  http://www.ibiblio.org/gferg/ldp/Samba-with-SSH/Samba-with-SSH.html 

 
  1. Logged on to bowenvale.pointclark.net as root and started screen so that the ssh tunnel doesn't close when I log off.
  2. # ssh -2 -q -f -N -g -L 139:farm:139
    farm is the netbios name on cia.crra.org.nz
    I set this up wrong the first time so I had to find the ssh sessions and kill them:  
    # netstat -anp

    # ssh -2 -q -f -N -g -L 139:localhost:139
  3. Create the folder where the remote system will be mounted to

    [root@bowenvale ~]# mkdir /mnt/cia.crra.org.nz
    [root@bowenvale ~]# mkdir /mnt/cia.crra.org.nz/graffiti
  4. Now to set up the smb connection

    [root@bowenvale ~]#  smbmount "\\\farm\graffiti" /mnt/cia.crra.org.nz/graffiti -o username=guest,password=,ip=127.0.0.1
    ERROR: Badly formed boolean in configuration file: "auto".
    Error connecting to 127.0.0.1 (Connection refused)
    25443: Connection to farm failed
    SMB connection failed

    And clearly I have done something else wrong.
ssh -2 -q -f -N -g -L 127.0.0.2:139:127.0.0.1:139 - This didn't work
 

Ok, haven't got this to work yet.  Thinking that making it work from putty direct to the machine might be easier but it means I can't automate a backup.