在sshfs中如何处理转义字符

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
1003518805
帖子: 13
注册时间: 2017-07-14 19:28

在sshfs中如何处理转义字符

#1

帖子 1003518805 » 2017-08-04 13:52

例如密码是 \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
头像
九天星
帖子: 1440
注册时间: 2007-07-14 20:45

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

#2

帖子 九天星 » 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

试试这样呢!看行不行!
1003518805
帖子: 13
注册时间: 2017-07-14 19:28

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

#3

帖子 1003518805 » 2017-08-31 16:09

九天星 写了:
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>
回复