Instead of using ssh or sftp to access the files in your home directory, you can mount your home directory as a drive or volume over an ssh connection. While this method is relatively stable and straight-forward on Linux systems, it should be noted that getting this to work on Mac and Windows systems can be tricky. Use the following tutorials to get started.
This tutorial is aimed toward mounting your ECE home directory on your Windows PC at home or in the office. To do this, we will use a piece of software called “dokan” which creates a file system on top of an SSH connection (SSHFS). This is done through port 22 (SSH) and is closely related to SFTP, therefore the security of this software is equal to the security of the Secure Shell connection. Departmental machines come pre-installed with the open-ssh server running. Therefore we will go straight to the Windows setup.
Set up Dokan on your Windows PC
Download and install the following packages, rebooting when required:
- .Net Framework 2.0 Redistributable Package It’s about 22.5mb. Once downloaded you will have a file dotnetfx.exe. Double click on this and follow the installation prompts selecting all defaults.
- Microsoft Visual C ++ 2005 SP1 redistributable Package (~2.6mb) Its about 2.6mb. Once done, double click on the file vcredist_x86.exe and let it install. If a reboot is required then do so.
- Dokan Libraries (32 bit) Unzip and double click on the DokanInstall32.msi to install it.
- DokanSSHFS Software Unzip and double click on the DokanSSHFSInstall.msi to install it.
- The installation will have placed dokan in your start menu / programs. Navigate to the shortcut and run dokansshfs (you will need the IP/FQDN of your linux PC sharing via ssh, and the user and password at this point)
- Enter the required details in the dialog box, select a drive letter, click OK, click OK again in the little dialog that appears, and then open up “My Computer” and you should see your drive letter. Click on this and it should reveal your linux share. Depending on your security settings you should have read / write access (at least to the users home directory)
- You can save your access settings to make things easier to recall next time, but you will always have to enter the password.
- You can also enter a path from root, so that the share opens up at a specific point on your file tree (e.g. /media/myfiles)
- You can add additional shares by running dokansshfs again.
- Dokan must be run to mount network drives upon each boot (it is not automatic).
- Dokan is under heavy development so expect the versions to change on a regular basis, if the direct links do not work go to their site and download the latest versions of dokan library and dokansshfs. there is a dokan library for 64bit machines too.
- Also, as it is under development, you can’t expect it to be flawless or work as you expect, but it worked for me first time, and allowed file exchange and audio / video real time viewing (as opposed to download then watch/listen.)
Licensing Information on Dokan
Some licensing info on dokan from the developer: Hiroki Asakawa
- Dokan SSHFS is provided “AS IS”, without warranty of any kind, expressed or implied. Use at your own risk.
- Dokan SSHFS is being licensed to you free of charge for your private persona use only. You may use Dokan SSHFS for non-commercial purposes only.
- Redistribution of Dokan SSHFS is prohibited.
All credits to Hiroki for this great addition to Windows software that helps provide access to ssh shares, which are more likely found on linux PCs.
This HOWTO was adapted from Jose Catre-Vandis‘s post on Ubuntu Forums on Jan. 1, 2009.
See the LifeHacker tutorial.
(Ubuntu and RHEL5 tested)
This document walks the user through mounting a remote directory (i.e. your home directory on the ece servers) to their linux desktop through ssh (sftp). The process is pretty simple.
- Click “places” on the top menu bar
- Click “connect to a server”
- Change the first setting to SSH
- Enter the name of the server location (i.e. intelx.ece.ucdavis.edu)
- Change the port to 22
- Choose which folder you would like to mount (i.e. /home/jdoe )
- Enter your username.
If using Ubuntu, check the box marked “add bookmark,” and change the bookmark name to whatever you would like (i.e. HOME)
If using Red Hat Enterprise Linux 5, simply name your connection in the last box (i.e. HOME)
- You can get to your remote location either by clicking “Places” on the top menu bar, and then finding your connection in the list, or simply click the icon with the name of your connection on your desktop.
Written by Keith MacMillan on behalf of the Department of Electrical and Computer Engineering at the University of California, Davis on July 13, 2009.