I want to map a network drive at home (over SSH) from my workplace.
1) Install a loopback adapter.
2) Disable “Client for Microsoft Networks”, “File and Printer Sharing for Microsoft Networks” and anything else except “Internet Protocol (TCP/IP)”.
3) Set a static IP address, I use 10.0.0.1 in this example (no gateway, no DNS).
4) Edit advanced TCP/IP settings, change to the WINS tab, disable “NetBIOS over TCP/IP” and enable lmhosts lookup. If you don’t disable “NetBIOS over TCP/IP” you will receive this error message when you want to establish the SSH tunnel: “Network error: Permission denied” because port 139 is used by Windows.
5) Edit/create the lmhosts file (%windir%system32driversetclmhosts) and add this line:
6) Try to ping REMOTE-MACHINE-NAME.
Ok the NIC is now prepared, lets play with SSH…
Create the SSH tunnel
1) Load your SSH session in putty.
2) Add a new SSH local tunnel:
Note: the text field in putty for the “Source Port” looks too small, ignore it, you can enter the local IP address as well. Do NOT enter the machine name, use the IP address!
3) Save the session and connect.
That’s it, now we need to map our new drive:
C:> net use * \10.0.0.1c$ /user:10.0.0.1administrator password