| Print View | RSS |

RemoteAccess/SSHTunneling/WindowsSamba

Remote Access > SSH Tunneling > Windows Samba

How to Securely Mount Samba From Home Using SSH on Windows

The VPN is strongly recommended as the preferred way to mount Samba from home. However, two or more people can not make a VPN connection from the same IP address. Therefore, if two people need to mount Samba from a home network, one of them is going to have mount Samba through SSH.

Software

Please download a copy of PuTTY which is available free of charge.

Download and Install PuTTY

Follow the instructions for downloading and installing PuTTY on their web site. PuTTY does not write to your registry, therefore, if you download PuTTY to your desktop it will simply leave an icon. Just double click on the icon (screen shot below) to launch PuTTY.

Configure Windows to do Port Forwarding

You will need to disable File and Print Sharing which comes preinstalled with Windows. On XP go to the Control Panel. Start -> Control Panel, from within the Control Panel select Network Connections then right click on your Local Area Connection and click Properties.

Select File and Print Sharing for Microsoft Networks and click the Uninstall button. Windows will want to reboot at this point.

Let Windows reboot your computer.

Instructions on reinstalling File and Print Sharing for Microsoft Networks are at the bottom of the page.

Configure PuTTY and Connect

Open PuTTY. In the Host Name area type cs.toronto.edu and in the Port section enter 22.

Click on the SSH/Tunnels section.

Make sure the following fields are entered:

  • Source Port: 139

  • Destination smb.cs.toronto.edu:139

  • Make sure the Local button is selected

  • Click the ADD button

Next click the Session section and press the Save button.

Click Open and login to cs.toronto.edu using your CSLab username.

Mount Samba

These instructions are for Windows XP.

Go to My Computer by clicking on Start -> My Computer.

From within My Computer on the top toolbar select Tools and from the drop down menu select Map Network Drive.

  • Select a drive name for this mount point. In this example: it is Z
  • In the Folder: field, enter \\127.0.0.1\your_username. In this example the username is jessetst.
  • On Windows NT4, 2000 and XP you have the option to connect using a different username. If you are using Windows95/98 or ME, make sure that you are using the same Windows username as your fileserver expects, or you will not be able to connect.
  • Click the Finish button. You will be prompted for your password.

  • When Samba is mounted you will see a drive Z: in My Computer under Network Drives

Unmount Samba and Close Secure Connection

When done right click on your network drive. From the drop down menu select Disconnect

Close your PuTTY connection by typing exit at the command prompt.

Instructions for Reinstalling '''File and Print Sharing'''

On XP go to the Control Panel.

Start -> Control Panel

From within the Control Panel select Network Connections then right click on your Local Area Connection and click Properties.

Click Install. Select Service and click on the Add button.

Select File and Print Sharing for Microsoft Networks, and click the OK button.