This is a short guide to get ssh to work on debian or ubuntu. So this should also work with some other linux distributions. It can be a very useful tool to be able to access your home directory from a second linux machine or from your raspberry pi. I have been using it so that you can run your normal powerful code editors which the raspberry pi does not have enough resources to run them fast enough.

To Install / Setup

sudo apt-get install sshfs
sudo addgroup $USER fuse

Note: You don't need to add your self to the fuse group. But it is required if you want to be able to mount / umount the filesystem without root permissions and while running as your normal user

To Use in this case to mount /home/$USER/ from a raspberry pi

mkdir /home/$USER/Raspberry
sshfs remoteuser@ipaddress:/home/remoteusername/ -o uid=1001,gid=1002 /home/$USER/Raspberry

In the above you should change the uid and gid to your user id and group id. You can look those up in the /etc/passwd and /etc/group files on the machine that you are mounting the remote filesystem on.

To unmount again

fusermount -u /home/$USER/Raspberry/

Another useful tip is that it will also work with ssh key authentication so you will not be prompted for a password





Last Modified: 12 December 2016

Releated Posts


2013-03-01 - Linux - What and how to kill a zombie process
2013-02-14 - Linux - Getting sshfs to work
2012-12-12 - Linux - List / Copy group membership for users
2012-12-08 - Linux - ssh key authentication
2012-12-04 - Linux - sudo without a password
2012-10-13 - Rasberry Pi - Alternative method to play video without omx gstreamer element
2012-10-10 - How to run tcpdump as root
2012-07-13 - Linux - Killing all processes for a specific user
2012-04-05 - Using gdb to debug a core file
2012-01-16 - Linux - Color Coding The Bash Prompt
2012-01-14 - Linux - Automatically set the DISPLAY environment variable in SSH connection
2012-01-06 - Adding extra swap space to linux