在sshfs中如何处理转义字符

sh/bash/dash/ksh/zsh等Shell脚本
回复
1003518805
帖子: 13
注册时间: 2017-07-14 19:28

在sshfs中如何处理转义字符

#1

帖子 1003518805 » 2017-08-03 12:41

例如密码是 \qweasd\

sshfs -o ssh_command="sshpass -p \\qweasd\\ ssh" -o reconnect user@server:/path /mountpath -d -o sshfs_debug




提示
executing <sshpass> <-p> <qweasd> <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-2> <user@server> <-s> <sftp>
Permission denied, please try again.
read: Connection reset by peer


以下方法均无效
sshfs -o ssh_command="sshpass -p '\qweasd\' ssh" -o reconnect user@server:/path /mountpath -d -o sshfs_debug
sshfs -o ssh_command='sshpass -p \qweasd\ ssh' -o reconnect user@server:/path /mountpath -d -o sshfs_debug
回复