LoginSignup
10
9

More than 5 years have passed since last update.

[Linux][sshfs] SSH でアクセスできるリモートシステムをローカルフォルダにマウント

Posted at

SSHで接続している先の、特定ディレクトリをマウントしたい場合メモ

sshfsのインストール

apt
$ sudo apt-get install sshfs

使用方法

マウント
$ sshfs USERNAME@HOSTNAME_OR_IP:/REMOTE_PATH LOCAL_MOUNT_POINT SSH_OPTIONS
アンマウント
$ fusermount -u LOCAL_MOUNT_POINT

使用例

sshfsを利用したディレクトリのマウント
$ mkdir share_dir
$ sshfs user@192.168.12.345:/target_dir share_dir/
user@192.168.12.345's password:
$ mountpoint share_dir/
share_dir/ is a mountpoint
$ fusermount -u share_dir
$ mountpoint share_dir/
share_dir/ is not a mountpoint

参考

Sshfs - ArchWiki
ssh越しにフォルダをマウントできる『sshfs』コマンド | 俺的備忘録 〜なんかいろいろ〜

10
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
9