我使用lftp为了从Linux机器12.18.21.15(red hat – 5.3)获得file.txt,
my linux login/password: login - diana password - diana123 IP - 12.18.21.10
我有一个问题,lftp无法获得file.txt,请告诉我需要检查什么? 可能是什么问题呢?
lftp -u diana,diana123 12.18.21.15 -e "get file.txt ; exit " `file.txt' at 0 [Delaying before reconnect: 22] DEBUG MODE lftp -d -u diana,diana123 12.18.21.15 -e "get file.txt ; exit " ---- Connecting to 12.18.21.15 (12.18.21.15) port 21 **** Socket error (Connection refused) - reconnecting ---- Closing control socket `file.txt' at 0 [Delaying before reconnect: 14] I also performed: telnet 12.18.21.15 21 Trying 12.18.21.15... telnet: connect to address 12.18.21.15: Connection refused ftp 12.18.21.15 ftp: connect: Connection refused ftp> exit I check my machine - 12.18.21.10 rpm -qa | grep ftp ftp-0.17-17.2 tftp-0.39-0.EL3.4 lftp-2.6.3-6 vsftpd-1.2.1-3E.6 # ps -ef | grep ftp | grep -v grep root 2302 1 0 Oct27 ? 00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
备注 – >我有ping到12.18.21.15 linux机器,还有ssh / scp等等!
从远程linux机器查看 – 12.18.21.15
[root@linux ~]# su - diana [diana@linux ~]$ pwd /home/diana [diana@linux ~]$ ls file.txt
**** Socket error (Connection refused) - reconnecting消息表明您没有在远程系统上运行的ftp服务器。 你应该检查你是否已经安装并运行了一个服务器。
rpm -qa | grep ftp vsftpd-2.0.5-21.el5 proftpd-1.3.3f-1.el5 lftp-3.7.11-4.el5_5.3 ftp-0.17-35.el5
应该列出所有安装的ftp相关软件包。 正如你所看到的,我的系统上安装了vsftpd和proftpd 。 要检查哪个正在运行,请使用ps来确定是否正在运行
ps -ef | grep ftp | grep -v grep root 9028 1 0 12:00 ? 00:00:00 /usr/sbin/vsftpd /etc/vsftp /vsftpd.conf
我正在运行vsftpd 。 如果你没有运行ftp服务器,你会看到上面没有输出。
如果你没有安装ftp服务器,那么你可以安装一个
sudo yum install vsftpd
要么
sudo yum install proftpd
无论你喜欢什么。 如果你有一个ftp服务器,那么你可以启动它
sudo service vsftpd start
要么
sudo service proftpd start.
无论你安装什么。