Sshfs

From 탱이의 잡동사니
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Overview

리눅스 명령어 sshfs 내용 정리

Basic

sshfs - Secure SHell FidlSystem 의 약자이다. 간단히, ssh 를 이용해서 파일시스템을 마운트를 하는 명령어이다.

원격지 서버와 연동하여 작업을 할 때, ssh 로 연결해서 vi로 작업하기가 까다롭고 귀찮을 때가 있다. 이런 경우, sshfs 를 통해서 작업 디렉토리를 로컬 디렉토리로 마운트를 시킨다음 작업을 하면 굉장히 편리해진다.

mounting
    sshfs [user@]host:[dir] mountpoint [options]

unmounting
    fusermount -u mountpoint

Mount/Unmount 할 때 사용하는 명령어가 다르다. 마운트를 할 때 사용하는 명령어는 sshfs 이고, 마운트 해제시, 사용하는 명령어는 fusermount 이다.

Example

실제로 파일 시스템 마운트 시, 다음과 같이 사용한다.

sshfs root@192.168.0.10:/root ~/root_remote