我正在尝试创建一个vbscript来连接到使用putty的FTP服务器。我遇到的问题是密码有一个;和“in it. I have to The password in”,并且还使用\来转义字符
例如:
-pw 3this;IsMyPwd“是我想要使用的
已尝试“3this;IsMyPwd”-> putty无法连接到远程服务器
-pw 3此;IsMyPwd“-> putty不连接到远程服务器
3此\;IsMyPwd\“-> putty未连接到远程服务器
3this;IsMyPwd\“-> putty连接到远程服务器,但要求输入密码或挂起
-pw 3this;IsMyPwd"“> putty确实连接到远程服务器,但要求输入密码或挂起
发布于 2015-10-06 05:54:56
答案是不使用putty。我使用了WinSCP。您不必将其安装在服务器上,您可以将WinSCP.com和WinSCP.exe复制到文件夹中。
使用命令创建文件,请注意%22URL编码为“example of Cmd.txt”文件
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open sftp://USERNAME:password%3%22@ftp.server.org
ls
cd to_folder
ls
close
exit运行命令C:\winScp> winscp.com /script=Cmd.txt
https://stackoverflow.com/questions/32770729
复制相似问题