1安装sshfs

[root@iZwz9hy7gff0kpg1swp1d3Z ~]# yum install sshfs

2创建本地目录

[root@iZwz9hy7gff0kpg1swp1d3Z ~]# mkdir /lys

[root@iZwz9hy7gff0kpg1swp1d3Z ~]# chmod 777 /lys/

3挂载远程目录到本地

[root@iZwz9hy7gff0kpg1swp1d3Z ~]# sshfs 远程服务器的登录名@远程服务器的ip:/home/img lys/

需要输入远程用户的密码

Linux使用sshfs挂载远程目录到本地

4卸载远程的文件系统

[root@iZwz9hy7gff0kpg1swp1d3Z ~]# umount /lys/

 

挂载时出现的问题:

fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option

使用命令:

sshfs root@101.132.36.35:/home/img /lys -o nonempty

 

相关文章:

  • 2021-11-08
  • 2021-07-29
  • 2021-06-04
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2021-11-12
猜你喜欢
  • 2021-07-14
  • 2021-09-29
  • 2021-09-05
  • 2022-12-23
  • 2021-09-21
  • 2021-06-25
相关资源
相似解决方案