-
搭建ftp服务器,参考腾讯云的教程:
https://cloud.tencent.com/developer/labs/lab/10123
但是在后面连接的几种方法不能用,所有两个替代方案:
1)ftp ip 然后使用get和mget来获取remote端文件。
2)使用直接命令行方法:参考https://superuser.com/questions/532130/how-to-download-files-from-ftp-site-in-one-command-line-without-user-interaction
WGET ftp://ftp.mydomain.com/path/file.ext
//for anonymous downloads
//or:
WGET ftp://user:password@ftp.mydomain.com/path/file.ext
//when authentication is required.
2、出现错误的原因之一:
421 Service not available, remote server has closed connection
Login failed.
No control connection for command: 传输端点尚未连接
上述错误在本人的一台虚拟机里面出现,在另一台云服务器里面没有这个错误。具体原因未知。
-
SFTP服务器的搭建:
方法参考如下链接:
https://askubuntu.com/questions/420652/how-to-setup-a-restricted-sftp-server-on-ubuntu#607898
如果出现下面错误:
Job for ssh.service failed because the control process exited with error code. see systemctl status ssh.service and journalctl -xe for details.
请参考链接:
https://askubuntu.com/questions/867967/ssh-server-fail
主要通过如下指令排查:
sudo /usr/sbin/sshd -T
Update the article at Dec. 22, 2020:
A great and success method is in https://www.cnblogs.com/whatmiss/p/7068772.html
本文详细介绍如何在Ubuntu上搭建FTP服务器及SFTP服务器,包括配置过程与常见错误解决方法。提供两种替代连接方案,以及如何使用命令行进行文件下载。同时,针对SFTP服务器搭建过程中可能出现的问题给出解决方案。
2647

被折叠的 条评论
为什么被折叠?



