Мой профиль...

Поиск по этому блогу

пятница, 5 февраля 2016 г.

How To Use SSHFS to Mount Remote File Systems Over SSH - Как замаунтить ssh диск

1. Make authorized_keys with remote server

  • for generate key use ssh-keygen
  • for change password use ssh-keygen -p
It's made such files:
~/.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="">
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

Комментариев нет:

Релевантные посты...

Related Posts with Thumbnails