참조 사이트 : https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh
참조 사이트를 보면 알겠지만 방법 자체는 간단하다
1. 마운트할 폴더를 만든다
2. fstab을 편집해 다음고 같이 마운트 한다.
<로고온할 아이디>@<IP>:/<마운트할 리모트 폴더> /<마운트 할 로컬 폴더> fuse.sshfs delay_connect,allow_other,nonempty,idmap=user,default_permissions,identityfile=<키 위치>/id_rsa,uid=1001,gid=1001 0 0
위와 같이 로그인 하면 되나 이렇게 하면 해당 폴더가 에러를 내며 제대로 마운트가 되지 않는다.
d????????? ? ? ? ? ?
결국 방법은 해결 방법은 단순하다.
일단 해당 폴더를 언마운트 한 뒤, sshfs 명령어를 이용해 한번만 수동으로 마운트를 해주면 해소된다.
sudo sshfs -o allow_other,default_permissions,IdentityFile=~/.ssh/id_rsa root@xxx.xxx.xxx.xxx:<마운트 할 리모트 위치> <마운트 할 로컬 위치>
이렇게 명령어를 내려 주면 접속 여부를 물어 보는데 y로 대답해 주면 그 다음부터는 fstab으로 지정한대로 자동 마운트가 될 것이다.
댓글 없음:
댓글 쓰기