Mounting your Nikhef home directory using SSH
for Windows Vista

Introduction

This tutorial contains screenshots for the English version of Windows Vista. 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 Note that this is slightly different from the requirements for Windows 2000/XP, as with Vista/7 a different protocol driver (SMB) is used compared to the older versions of Windows (Netbios over TCP/IP or CIFS).

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 Loopback Adapter.
  2. After that, the network adapter must be properly configured.
  3. Furthermore, a Windows system driver needs to be tweaked.
  4. And we need to create a Task for the Windows Task Scheduler.
  5. Reboot Windows and verify that all changes were applied successfully.
  6. Then we set up a special PuTTY session with the right port-forwarding.
  7. Finally, we start PuTTY and mount our Nikhef home directory.

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

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.

Configuring the Loopback Adapter

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

Tweaking the 'SMB' 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 Vista or 7 boots this port is grabbed by the system smb driver for all interfaces. By delaying the startup of the smb driver and by installing a portproxy rule we can circumvent this. This section explains how to do this:

Creating a task to start the 'SMB' driver

Of course, now that we have disabled the automatic startup of the 'SMB' driver we need to start it manually when Windows comes up, or rather, when a user logs in. For this we use the Vista Task Scheduler: The task is now configured. Close the Task Scheduler.

Reboot and verify

Of course, now that we have disabled the automatic startup of the 'SMB' driver we have to reboot Windows before proceeding.

Configuring PuTTY

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

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:
Congratulations!

Mapping a network drive

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

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 smb driver by typing
      sc config smb start= auto
    
    NOTE the space after the start= !
  3. Remove the portproxy rule by typing
      netsh interface portproxy delete v4tov4 listenaddress=10.255.255.1 listenport=445
    
  4. Start a Device Manager by typing
      devmgmt.msc
    
    Expand the 'Network Adapters', right-click on Loopback adapter and select Uninstall.
  5. Use the 'Task Scheduler' from the 'Administrative Tasks' menu to delete the task 'Start SMB driver'