当前位置:网站首页>sshfs + autofs + sshpass (by quqi99)
sshfs + autofs + sshpass (by quqi99)
2022-07-22 18:35:00 【quqi99】
Copyright notice : You can reprint at will , When reprinting, please make sure to indicate the original source of the article, the author's information and this copyright notice in the form of hyperlinks ( author : Zhang hua Published in :2021-07-16)
cat << EOF | sudo tee /bak/bin/sshpass.sh
#!/bin/bash
sshpass -f /home/hua/.pwd ssh $*
EOF
chmod +x /bak/bin/sshpass.sh
#sshfs -o password_stdin [email protected]:G:\share /mnt/win <<< 'password'
sshfs -o reconnect,allow_other,follow_symlinks,ssh_command='/bak/bin/sshpass.sh' [email protected]:G:\share /mnt/win
#autofs
/mnt/win -fstype=fuse,port=22,reconnect,allow_other,follow_symlinks,ssh_command=/bak/bin/sshpass.sh :sshfs\#[email protected]\:G:\share
#/etc/fstab
sshfs#[email protected]:G:\share /mnt/win fuse ssh_command=/bak/bin/sshpass.sh 0 0
sudm mount -a
$ sudo cat /etc/auto.master |tail -n1
/- auto.direct
$ sudo cat /etc/auto.direct
/nas -fstype=nfs4,rsize=32768,wsize=32768 nas:/Public
/mnt/win_share win:/win_share
/mnt/win_bak win:/win_bak
# DEV_NAME=$(readlink /dev/disk/by-path/ip-192.168.2.108\:3260-iscsi-iqn.2020-11.com.quqi\:catdisk.share-lun-1 |xargs basename)
#/bakiscsi -fstype=ext4,rw,nosuid,nodev :/dev/sdc1
#/mnt/samba -fstype=cifs,rw,username=root,password=password,vers=1.0,file_mode=0777,dir_mode=0777 ://192.168.2.47/share
/mnt/win -fstype=fuse,port=22,reconnect,allow_other,follow_symlinks,ssh_command=/bak/bin/sshpass.sh :sshfs\#[email protected]\:G:\\share
边栏推荐
猜你喜欢
随机推荐
2022-07-21: given a string STR and a positive number k, you can divide STR into multiple substrings at will, in order to find that in a certain division scheme, there are as many palindrome substrings
枚举对象中属性
力扣解法汇总1051-高度检查器
抖音巨量引擎1 创建广告计划
Geowebcache publishes ArcGIS slice data
折腾凤凰系统 (by quqi99)
debug glance(by quqi99)
H5在移动端上禁止缩放
About the external entity key operation spinbox control in stemwin (fishing_2)
C语言简易TCP服务端程序
Use of content model and content collection for dynamic data processing of applet CMS
反射+注解+泛型
Codeforces Round #806 (Div. 4)(7/7)
力扣解法汇总676-实现一个魔法字典
化繁为简,聊一聊复制状态机系统架构抽象
Js高级-对象的理解
ES6 assignment deconstruction
arguments
creating vlan over openstack (by quqi99)
2021-10-18使用eop烧写裸板程序