1

I use the lftp in order to get the file.txt from Linux machine 12.18.21.15 (red hat - 5.3)

 my linux login/password:

 login - diana
 password - diana123
 IP - 12.18.21.10

I have a problem that lftp can't get the file.txt , Please advise what I need to check? What could be the problem?

      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

Remark --> I have ping to 12.18.21.15 linux machine , and also ssh/scp...etc !

view from the remote linux machine - 12.18.21.15

  [root@linux ~]# su - diana
  [diana@linux ~]$ pwd
   /home/diana
  [diana@linux ~]$ ls
  file.txt

1 Answer 1

2

The **** Socket error (Connection refused) - reconnecting message suggests that you don't have an ftp server running on your remote system. You should check that you do have a server installed and running.

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

should list all the ftp related packages that are installed. As you can see I have vsftpd and proftpd installed on my system. To check which is running use ps to find out if one is running or not

ps -ef | grep ftp | grep -v grep

root   9028  1  0 12:00 ?  00:00:00 /usr/sbin/vsftpd /etc/vsftp /vsftpd.conf

I'm running vsftpd. If you don't have an ftp server running you will see then you will see no output above.

If you don't have an ftp server installed then you can install one with

sudo yum install vsftpd

or

sudo yum install proftpd

whichever you prefer. If you have an ftp server installed then you can start it with

sudo service vsftpd start 

or

sudo service proftpd start. 

whichever you installed.

6
  • hi lain , see my update I have all rpms and vsftpd.conf is runing so this is not the problem , any way for other machine its work but for 12.18.21.15 lftp isnt work
    – Diana
    Nov 15, 2011 at 12:14
  • what does the output of netstat -lnp | grep vsftp show?
    – user9517
    Nov 15, 2011 at 12:28
  • but on 12.18.21.15 machine --> ps -ef | grep ftp root 22757 22353 0 14:31 pts/1 00:00:00 grep ftp ( this mean that vsftpd not exist under /etc/init.d on 12.18.21.15
    – Diana
    Nov 15, 2011 at 12:32
  • Does this mean that my answer is in fact correct ?
    – user9517
    Nov 15, 2011 at 12:35
  • lain what I say is that on my machine (12.18.21.10) I have vsftpd but on remote machine (12.18.21.15) I dont have , so I need to install the vsftpd on the remote machine (12.18.21.15) ? also ?
    – Diana
    Nov 15, 2011 at 13:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .