【发布时间】:2012-10-10 09:04:33
【问题描述】:
我想请你帮忙。当我的用户名包含 @ 符号时,如何使用 scp 任务?
我尝试以多种方式转义该角色,但它不起作用。在以下示例中,我的用户名是 user@host.com
<scp file="test.txt" todir=""user@host.com":password@ftp.host.com:/" trust="true" sftp="true"/>
<scp file="test.txt" todir="'user@host.com':password@ftp.host.com:/" trust="true" sftp="true"/>
<scp file="test.txt" todir="user\@host.com:password@ftp.host.com:/" trust="true" sftp="true"/>
但是输出总是一样的:
neither password nor keyfile for user "user has been given. Can't authenticate.
请问,是否有强制任务正确解析此字符串?非常感谢。
顺便说一句,我不知道为什么,但是对于我当前的提供商,如果不附加主机名就不可能创建用户名。
【问题讨论】: