Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

While using an FTP service through the command line, I try to retrieve a directory listing. I get:

ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
> ftp: get :Connection reset by peer

Any ideas how I should go about resolving this problem? Thanks in advance.

share|improve this question

2 Answers 2

Try enabling Passive FTP on your client. You can read more about the active/passive ftp here

In active mode FTP the client connects from a random unprivileged port (N > 1023) to the FTP server's command port, port 21. Then, the client starts listening to port N+1 and sends the FTP command PORT N+1 to the FTP server. The server will then connect back to the client's specified data port from its local data port, which is port 20.

alt text

In passive mode FTP the client initiates both connections to the server, solving the problem of firewalls filtering the incoming data port connection to the client from the server.

alt text

share|improve this answer

Looks like its dropping you because it cannot open a connection over the data transmission ports. Is the FTP server within your LAN?

share|improve this answer
    
yes - it is within the LAN –  Jenski May 6 '10 at 9:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.