Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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.