Why do I get kicked out of a FTP session once I run a command?

There is most likely a NAT-firewall between you and the servers showing the symptom. (NAT-firewalls hide a whole network behind a single IP-number).

The problem is that ftp wants to send the data resulting from the command in a new, separate TCP/IP connection and that cannot go through the firewall because it needs to go from the server to you, and you are hidden behind the firewall which has no clue that the data is intended for your machine. When the FTP protocol was designed, many modern devices like the NAT-router (which became necessary when there were more devices than available IP-addresses) had not been invented yet.

Use the pasv command (may be called something different in your client) to change to a passive connection where data connections go from you to the server.

See http://slacksite.com/other/ftp.html for a more detailed explanation.

Tags:

Ftp