1. Make authorized_keys with remote server
- for generate key use ssh-keygen
- for change password use ssh-keygen -p
~/.ssh/id_rsa.pub - opened key
~/.ssh/id_rsa - private key
After that copy key into remote server: ssh-copy-id user@server
2. Installing SSHFS
sudo apt-get install sshfs
3. Mounting the Remote File System
sudo mkdir /mnt/droplet <--replace code="" droplet="" prefer="" whatever="" you="">--replace>
sudo sshfs root@xxx.xxx.xxx.xxx:/ /mnt/drople
sudo sshfs -o IdentityFile=~/.ssh/id_rsa root@xxx.xxx.xxx.xxx:/ /mnt/droplet
4. For permanent connection add following record to /etc/fstab
USERNAME@HOSTNAME_OR_IP:/REMOTE/DIRECTORY /LOCAL/MOUNTPOINT fuse.sshfs _netdev,user,idmap=user,transform_symlinks,identityfile=/home/USERNAME/.ssh/id_rsa,allow_other,default_permissions,uid=USER_ID_N,gid=USER_GID_N 0 0