[work] sshfs挂载时自动输入密码

大家都知道登陆ssh可以用sshpass自动输入密码,但是挂载sshfs却不行,其实sshpss是可以给sshfs输入密码的,只需要使用参数-o ssh_command=’sshpass -p password ssh’。

例如:

sshfs -o ssh_command='sshpass -p 123456 ssh' -o cache=yes,allow_other user@ip path

猜你喜欢

转载自blog.csdn.net/Scythe666/article/details/85163043