分页: 1 / 1

在sshfs中如何处理转义字符

发表于 : 2017-08-04 13:52
1003518805
例如密码是 \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

Re: 在sshfs中如何处理转义字符

发表于 : 2017-08-04 14:11
九天星
1003518805 写了:例如密码是 \qweasd\

以下方法均无效
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

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

试试这样呢!看行不行!

Re: 在sshfs中如何处理转义字符

发表于 : 2017-08-31 16:09
1003518805
九天星 写了:
1003518805 写了:例如密码是 \qweasd\

以下方法均无效
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

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 ~/temp -d -o sshfs_debug
SSHFS version 2.5
FUSE library version: 2.9.2
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
executing <sshpass> <-p> <''qweasd''> <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-2> <user@server> <-s> <sftp>