How to mount your favourite Pi using sshfs

If you are working on any of the Pi such as Raspberry Pi, Orange Pi, Banana Pi whatever, you will often need to transfer files to and from the board. In general it is common that everyone uses ftp  or NFS  for accessing the files. But if you want to access just like nfs but not complicate  with configurations and stuff then use sshfs.

apt-get install sshfs

Create a directory where you want to mount your Pi’s Root folder.

mkdir /mnt/MyPi

For mounting the Pi you need to know the IP address of the device, and have
username and password of your ssh ready. Because the sshfs uses just the same credentials as ssh.

sudo sshfs -o allow_other root@192.168.2.111:/ /mnt/MyPi/

Now you can go to /mnt/MyPi and freely navigate in your Pi folder.
Copy from and to the Pi and enjoy . Once you are done with the work it is always safe to umount the device before shutting down the Pi.

sudo umount /mnt/MyPi/

There is also a windows version of SSHFS you can use that to mount in windows too.

Leave a Reply

Your email address will not be published. Required fields are marked *