FTP服务端用的是 wing FTP server,部署在windows 2019 server
客户端操作系统是 Centos 7.9
编写的FTP自动上传脚本,总是提示密码不对,但密码是没问题的。
自动上传脚本
[oracle@work-server ~]$ cat incftp.sh
#!/bin/sh
ftp -v -n<<!
open 10.171.2.126 9494
user c##cqa12was dkcdwG$89#05
binary
hash
prompt
cd E:\EISSBAK
lcd /app
put del_arch.sh
close
bye
!
运行后提示的问题,问题出在user 一行
[oracle@work-server ~]$ ./incftp.sh
Connected to 10.171.2.126 (10.171.2.126).
220 Wing FTP Server ready
331 Password required for c##cqa12was
530 Not logged in,password error.
Login failed.
530 Please log in with USER and PASS first.
Hash mark printing on (1024 bytes/hash mark).
Interactive mode off.
530 Please log in with USER and PASS first.
Local directory now /app
local: del_arch.sh remote: del_arch.sh
530 Please log in with USER and PASS first.
Passive mode refused.
530 Please log in with USER and PASS first.
手动登录FTP可以成功
ftp> open 10.171.2.126 9494
Connected to 10.171.2.126 (10.171.2.126).
Name (10.171.2.126:oracle): c##cqa12was
331 Password required for c##cqa12was
Password:
230 User c##cqa12was logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bye
221 Goodbye.
调试了很多天,都没找到问题。