简体   繁体   English

通过命令行/批处理文件登录Azure FTP失败

[英]Azure FTP login via command line / batch file fails

I am trying to connect by FTP to an Azure Web App. 我正在尝试通过FTP连接到Azure Web App。 I downloaded the publish profile and copied the login to my FTP client and can connect successfully. 我下载了发布配置文件,并将登录名复制到我的FTP客户端,并且可以成功连接。 But when i use ftp.exe from Windows then i am not able to connect to the same host with the same credentials. 但是,当我从Windows使用ftp.exe ,我无法使用相同的凭据连接到同一主机。

I have read Connecting to Azure website via FTP but those solutions do not fix my problem. 我已经阅读了通过FTP连接到Azure网站,但是这些解决方案不能解决我的问题。

This is the output: 这是输出:

C:\Projects>ftp
ftp> open waws-prod-am2-201.ftp.azurewebsites.windows.net
Connected to waws-prod-am2-201.drip.azurewebsites.windows.net.
220 Microsoft FTP
Service 200 OPTS UTF8 command successful - UTF8 encoding now ON.
User (waws-prod-am2-201.drip.azurewebsites.windows.net:(none)): firstserver\$firstserver
331 Password required    
Password: 
530 User cannot log in.
Login failed.
Invalid command.

Also tried with username firstserver from the Windows command prompt, no difference. 还尝试从Windows命令提示符使用用户名firstserver进行操作,没有区别。 Do not forget: when logging in via commercial FTP client software I CAN login successfully. 不要忘记:通过商用FTP客户端软件登录时,我可以成功登录。

I tried backslashing the backslash and/or the dollar sign, but nothing helps. 我尝试反斜杠和/或美元符号,但是没有帮助。 What is going wrong, how do i login from the command prompt using the Windows default ftp.exe ? 发生了什么问题,如何使用Windows默认ftp.exe从命令提示符登录?

FTP客户端登录到Azure Web App

Windows FTP.exe失败

If you run ftp in debug mode ( -d switch), you will see that it truncates the password to 32 characters. 如果在调试模式下运行ftp-d开关),您会看到它将密码截断为32个字符。 That's why the connection fails. 这就是连接失败的原因。

Try using a shorter password. 尝试使用较短的密码。 Otherwise you will have to use another command-line FTP client. 否则,您将不得不使用另一个命令行FTP客户端。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM