There are two reasons for using Samba over SSH:
- The port 139 is blocked for the outside connection to Samba server machine.
- SSH can encrypt the packets transferred, so that it gives better security for Windows file sharing.
- Install a loopback network adapter for SSH port fowarding (or follow the steps from Microsoft):
- Go to Control Panel -> Classic View -> Add Hardware
- Choose "Yes, I have already connected the hardware"
- Choose "Add hardware device" from the bottom of the list
- Choose "Install the hardware that I manually select from a list"
- Choose "Network adapters"
- Choose Microsoft -> Microsoft Loopback Adapter
- Configure the loopback adapter:
- Go to Control Panel -> Classic View -> Network connections
- The new loopback adapter should be called Local Area Connection 2
- Right click on it and choose Properties.
- Enable "Client for Microsoft Networks"
- Disable "File and Printer Sharing for Microsoft Networks"
- Click Properties of Internet Protocol (TCP/IP)
- Enter an IP address such as 10.0.0.1, subnet mask 255.255.255.0
- Click Advanced -> WINS
- "Enable LMHOSTS lookup" and "Disable NetBIOS over TCP/IP"
- Connect to the Samba machine through SSH:
- Download and install PuTTY from PuTTY webpage.
- Start PuTTY.
- Go to Connection -> SSH -> Tunnels.
- In source port, enter 10.0.0.1:139
- In destination, enter 127.0.0.1:139
- Click Add
- Then enter your host name as usual for SSH connection and click Open
- After you have connected successfully to the Samba machine through SSH, the port forwarding should be OK.
- The connection should be ready and you can access the files on Samba machine by:
- Click Start -> Run
- Enter \\10.0.0.1
- You should see the files shared by the Samba machine
- You may need to enable port forwarding of SSH on the server machine.
- A page by Edwin Olson, from which the instructions on this page follow
- A page suggesting using loopback adapter so that the file sharing doesn't have to be disabled on the client machine.
- A mini-HOWTO for GNU/Linux client machine
- Another page for Samba over SSH, which shows how you may test the connection when something has gone wrong
No comments:
Post a Comment