SSHFS是基于SSH文件传输协议(SFTP)上的一个文件系统。在远程端,我们只需要安装SSH服务器,由于大多数SSH服务器已经支持这一点,有什么做远程服务器上安装除外SSH服务器。在客户端,我们需要安装fuse sshfs的包来远程安装...
分类: Filesystem SSH 运维 网络安全
2014-05-09 00:00:00
# yum install fuse-sshfs
$ sudo apt-get update $ sudo apt-get install sshfs
# mkdir /mntssh让挂载远程目录。在这个例子中,我们安装 /home/remoteuser 从192.168.1.12(remote.example.com)系统到我们的本地系统目录。
# sshfs laitkor@remote.example.com:/home/remoteuser /opt/mntssh[样本输出]
The authenticity of host 'remote.example.com (192.168.1.12)' can't be established. RSA key fingerprint is 77:85:9e:ff:de:2a:ef:49:68:09:9b:dc:f0:f3:09:07. Are you sure you want to continue connecting (yes/no)? yes remoteuser@remote.example.com's password:
# mount /dev/mapper/vg_svr1-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/sda1 on /boot type ext4 (rw) remoteuser@remote.example.com:/home/remoteuser on /mntssh type fuse.sshfs (rw,nosuid,nodev)此外进入你的挂载点,你会看到有文件从远程系统
# cd /mntssh # ls
remoteuser@remote.example.com:/home/remoteuser /mntssh fuse.sshfs defaults 0 0
# umount /mntssh从/etc/fstab文件中删除添加的条目
关注云架构公众号
Linux入门
QQ交流群:308781113