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
Did You find this page useful?
Yes
No