Samba over SSH

Oct 02, 2012 Networking Security System

As the title tells you we are going to talk about samba shares over ssh. The idea came to me with need of editing some PHP pages that also needed to be tested in real time on remote server. I know you would say you could use ssh and nano editor or maybe VNC or something else. I know that but I wanted to use windows version of SciTE and and at the same time save changes “locally”.

Requirements

So let’s start with things that you are going to need these:

  1. Windows PC
  2. Putty
  3. Microsoft’s loopdevice

Instructions

So first things first: You may already have several network drives already mapped to your Windows PC and you don’t want to lose them while contacting other share, that’s why we need to install/add loopback device (network adapter) on your PC.

So let’s get to it..

Install a loopback device

  1. Go to Control Panel and 2x click on add hardware icon
  2. Then choose add new hardware and press next (its going to take a while)
  3. Then in next window choose: and new device (guessing here because I am running a Norwegian version of windows 2000 pro)
  4. On next dialogue box choose: I am going to choose a device from the list
  5. Choose then a Network adapter ( or NIC )
  6. As Manufacturers choose Microsoft and as NIC use Microsoft Loopback Adapter
  7. After this press next, next and with this we have installed loopback ( hard part )

Configure the loopback device

Now go in networks in Control Panel and add following for our new NIC:

  1. IP address = 10.0.0.1
  2. SUBnet = 255.255.255.0
  3. Gateway (same as you have for your standard NIC)
  4. DNS (same as you have for your standard NIC)

Now its time to reboot (as this is not Linux)

Using Putty to connect

After reboot its time to start working on PUTTY setup which is easy part. To save you and me some time, I am not going to write much but going to show you a picture with settings…

![Putty samba][13]

After you added stuff in to PUTTY its time to out this setup to the test. Connect with putty and login to your server. After that press windows flag button + r to open a run window and type there 10.0.0.1

![Windows run command][12]

In a few sec you are going to be asked for your password and after that you are going to see and have access to your share through SSH locally.

![Running Samba via SSH][15]

Wicked isn’t it …

Notes

If you are unable to access your share (idle-time/next-logon) make sure that you disconnect and deactivate your Microsoft NIC and reactivate it again. After that reconnect with putty and everything would be OK again.

Comments