我想创建.sh文件
// Tried to connect to ftp server
ftp name_of_server
//input user name
username
//input password
password
链接如下 https://github.com/prokid221/shell-programing.git
它再次要求输入用户名和密码,而不是登录。 谁能帮忙解决这个问题吗?
最佳答案
如果您只需要文件传输,可以使用curl。
下载文件:
curl -O -u user:password ftp://example.com/some-file
上传文件:
curl -T some-file -u user:password ftp://example.com
注意:此方法可能会导致您的凭据保存在命令历史记录中。
关于shell - ftp 用户名和密码在 shell 脚本中自动生成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36316334/