1
我想问你一些帮助。我的用户名包含@符号时,如何使用scp任务?如何在Ant中逃脱@ SCP任务
我试图在很多方面逃避角色,但它不工作。在下面的例子中,我的用户名是[email protected]
<scp file="test.txt" todir=""[email protected]":[email protected]:/" trust="true" sftp="true"/>
<scp file="test.txt" todir="'[email protected]':[email protected]:/" trust="true" sftp="true"/>
<scp file="test.txt" todir="user\@host.com:[email protected]:/" trust="true" sftp="true"/>
但产量始终是相同的:
neither password nor keyfile for user "user has been given. Can't authenticate.
请,反正是有强制任务正确地解析这个字符串?非常感谢你。
顺便说一下,我不知道为什么,但与我目前的供应商不可能创建一个用户名,而不追加主机名。
嗨,谢谢你的回答。我确定我的用户名包含@符号。我现在只有Windows。但是当我使用任何GUI应用程序(如WinSCP或TotalCommander)时,连接就可以工作。是的,我必须使用SFTP连接而不是SCP。我阅读了文档(http://ant.apache.org/manual/Tasks/scp.html),密码可以通过双向传递。但这两种方式都不起作用 – Bhiefer
而当我通过TC连接时,我在标题中看到:user @ host.com @ ftp.host.com – Bhiefer
此线程http://www.iprodeveloper.com/forums/aft/53169讲座与旧版本的scp和sftp不兼容,以及其中包含@符号的用户名。他们提供了\ @或者升级服务器的转义。这有帮助吗? –