Mount a remote SSH folder in Ubuntu (cmd and GUI)
Connecting to a server across the internet is much more secure using SSH. There is a way that you can mount a folder on a remove server using the SSHFS service (based on the SSH File Transfer Protocol).
Open terminal and follow these steps:
1. Install sshfs
sudo apt-get install sshfs
2. Add yourself to the fuse group
sudo adduser yourname fuse
3. Log out and in again
4. Create a directory to mount the remote folder in (eg. in your home directory or in /media…)
mkdir ~/yourmountdirectory
5. Mount the remote server
sshfs username@host:/remotepath ~/yourmountdirectory
You'll be prompted to save the server key and for your remote password.
Now you should be able to cd into the directory and start using it as if it was local.
6. To unmount sshfs enter this command
fusermount -u ~/yourmountdirectory
GUI
I found two graphical user interfaces for SSHFS.
Pysshfs
Python/GTK script
1. Get the script
wget http://www.ad-comp.be/public/projets/pysshfs/pysshfs
2. Set the permission to execute
chmod +x pysshfs
3. Instal python dependency
sudo apt-get install python-pexpect
4. Run script
./pysshfs
Here you can see, how to use Pysshfs
via: www.ad-comp.be
GSSHF
You can get this GUI by two ways
1. The hard way (but it's quite easy:)
Get the source and compile it by yourself (hint: cmake, build-essential, libgtk2.0-dev, checkinstall or dh_make)
wget http://download.tuxfamily.org/sallu/utilities/gsshfs-1.0.3.tar.bz2 tar xjvf gsshfs-1.0.3.tar.bz2 cmake make sudo checkinstall
2. The easy way
Download a deb package, that i make for you.
UPDATE (2010/12/10)
Gigolo
I found another GUI application called Gigolo.
GVfs is an userspace virtual filesystem and the successor of GnomeVfs but does not depend on Gnome itself. It only requires a recent GLib version and a properly setup DBus system. Then it provides almost transparent access to remote resources like FTP or SFTP (SSH) connections, SMB (windows shares) or special resources like the Trash (trash://), Burn (burn://) or even accessing your digital photo camera (gphoto2://).
1. Install all necessary dependencies listed here.
2. Download the latest version from Gigolo homepage and extract it
wget http://files.uvena.de/gigolo/gigolo-0.4.1.tar.bz2 tar xjvf gigolo-0.4.1.tar.bz2
3. Enter Gigolo directory and this commands:
./configure make sudo checkinstall
This will install Gigolo and make new deb package, which you can use on another computer.
If you want remove Gigolo from your system, uninstall it as a regular package
sudo apt-get remove gigolo
I prepared this package for you v0.4.1
Gigolo v0.4.1: gigolo_0.4.1-1_i386.deb
tacoguy
19 Sep, 2013
This is now a dead link
“http://www.ad-comp.be/public/projets/pysshfs/pysshfs”
Maybe this is a better choice?
https://github.com/dprevite/pysshfs
taraskapral
22 Dec, 2013
this tutorial changed my life. You saved me so many hours, which I can know use for sleeping and etc.
εisεηhεiμ
3 Jan, 2014
Hola!, muchas gracias por el artículo. Me sirvió mucho, ahora que tengo un servidor especifico para desarrollar, me encanta esta opción, para desarrollar en mi laptop directo en mi servidor :) ¡saludos!
JoZ3
15 Feb, 2014
Thanks, this tutorial has been helpful :)
vaibhav_kaushal
17 Jan, 2017
Offtopic: Thank god there is at least one more person who thinks like me – using the saved time for sleeping ;)
Jack Pommer
26 Mar, 2017
This is helpful information. Thanks.