登录时,cmd ftp密码错误 [英] cmd ftp password error when logging in

查看:803
本文介绍了登录时,cmd ftp密码错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过使用 ftp -s:commandsfile.ftp 命令的批处理脚本自动执行ftp上传,起初一切似乎都正常:ftp服务器发送welcome消息时,会自动引入用户名,但是当ftp要求输入密码时,不会引入任何内容,而commandfile.ftp发送的所有其他命令都返回530您未登录错误:

I'm trying to automate an ftp upload with a Batch script using the ftp -s:commandsfile.ftp command, at first everything seems OK: ftp server sends welcome message, username is automatically introduced, but when ftp asks for a password, nothing is introduced and all other commands that commandsfile.ftp sends return a "530 You aren't logged in" error:

Connected to ns12.dnchosting.com.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 5 of 50 allowed.
220-Local time is now 16:02. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
User (ns12.dnchosting.com:(none)):
331 User [USERNAME]  OK. Password required

530 Login authentication failed
Login failed.

这是commandsfile.ftp文件:

This is the commandsfile.ftp file:

open web12.dnchosting.com 
[USERNAME]
[PASSWORD] 
lcd 
cd afolder 
mkdir anotherfolder 
mput "*.*" 
disconnect 
bye 

批处理脚本:

And this the batch script:

ftp -i -s:commandsfile.ftp

为什么CMD没有引入密码?

Why is CMD not introducing the password?

推荐答案

好的,问题解决了...... ftp文件在每行的末尾都有一个额外的空格字符,所以输入的密码是密码加上一个额外的空间,因为ftp文件是动态生成的。

Alright, problem solved... the ftp file had an extra space character at the end of each line, so that the password entered was the password plus an extra space because the ftp file is dynamically generated.

这篇关于登录时,cmd ftp密码错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆