Mounting your Nikhef home directory using SSH
for Windows 10


This tutorial contains screenshots for the English version of Windows 10. Separate instructions for other versions of Windows are also available: The instructions for Windows 2000/XP are also still available.
To be able to mount a Windows share over SSH we will need

This part of the tutorial is split into the following steps:
  1. As most people do not have a spare real network adapter in their computer, we will add an extra virtual network adapter by installing the Microsoft KM-TEST Loopback Adapter.
  2. After that, the network adapter must be properly configured.
  3. Furthermore, a Windows system driver needs to be tweaked.
  4. Next, reboot Windows to verify that we've been able to grab port 445 and to see if the lanmanserver driver is up and running.
  5. Next, we set up a special PuTTY session with the right port-forwarding.
  6. Finally, we start PuTTY and mount our Nikhef home directory.

  7. For those wishing to undo the above steps follow the instructions at the bottom of this tutorial.

Windows 10 Upgrade woes

Multiple persons have reported problems after a major Windows 10 upgrade (e.g. from 1803 to 1809). This is due mostly to the disappearance of the Microsoft KM-TEST Loopback Adapter and of the portproxy rule. In order to recover after a Windows 10 upgrade, try

1. Installing the Loopback Adapter

To install the Loopback adapter follow these steps: You are now ready to configure your newly installed Loopback adapter. Even though Windows might not ask you to, reboot anyways (heey, it's a Microsoft OS ;-)).
From reports I've seen on the Internet a reboot is sometimes required for the loopback adapter to come up properly.

2. Configuring the Loopback Adapter

Now that your newly installed loopback adapter is up and running we must configure it properly:

3. Tweaking the 'LanmanServer' driver

Now we first need to tweak a Windows system driver to overcome the thing that Microsoft broke. The root cause of the problem is that we need to access the file share using TCP port 445. However, when Windows 10 boots this port is grabbed by the system lanmanserver driver for all interfaces. By delaying the startup of the lanmanserver driver and by installing a portproxy rule we can circumvent this. This section explains how to do this: If all went well you should see something like
The portproxy rule is persistent, so there should be no need to repeat this step after a reboot.

4. Reboot and verify

Of course, now that we have disabled the automatic startup of the 'LanmanServer' driver we have to reboot Windows before proceeding. On Windows 10 things are slightly different compared to Windows 7 and 8; it seems that Microsoft has read my tutorial and decided to provide a way to use local shares again ;-) !

5. Configuring PuTTY

Set up a special PuTTY session with the appropriate port-forwarding:

6. Putting it all together

Now that we have configured both our loopback adapter and PuTTY we can put it all together and mount our Nikhef home directory as a Windows share:

Mapping a network drive

To make life even easier it might be handy to map a network drive to your Nikhef home directory:

7. Control+Z! Undo! Undo!

For those wishing to undo the CIFS-over-SSH trick follow these steps:
  1. Start a console window with elevated (Administrator) privileges.
  2. Restore the automatic startup of the lanmanserver driver by typing
      sc config lanmanserver start= auto
    NOTE the space after the start= !
  3. Remove the portproxy rule by typing
      netsh interface portproxy delete v4tov4 listenaddress= listenport=445
  4. Start a Device Manager by typing
    Expand the 'Network Adapters', right-click on Loopback adapter and select Uninstall.
  5. If necessary, use the 'Task Scheduler' from the 'Administrative Tasks' menu to delete the task 'Start SMB driver'
That's all, folks!

Comments to Jan Just Keijser | lastmod = 24/04/2019 18:17