Mount by SSHFS

SSHFS (SSH Filesystem) is a filesystem client to mount and interact with files located on a remote server or workstation over a normal ssh connection. It’s safer and more convenient than nfs. And it’s helpful especially when we are facing multiple servers and large dataset.

Install

sudo apt-get install sshfs

Mount remote filesystem

1
2
$ mkdir ~/remoteshared
$ sshfs <user>@<host>:/remotepath ~/remoteshared

Uninstall

umount ~/remoteshared

Tips

  1. read: Connection reset by peer

    1
    2
    3
    xxx@xxx:~$ sudo sshfs yanhd@172.23.65.122:/home/yanhd ./122
    read: Connection reset by peer
    xxx@xxx:~$

    Use the ssh port -p <portnumber>. Check whether the ssh works. If ssh works, sshfs will work.