FTP is timing out

Posted June 13, 2019 3.3k views
Configuration Management

Setting up sftp in filezilla and receiving:

Status: Connecting to…
Response: fzSftp started, protocol_version=8
Command: open “root@” 22
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to server

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers


You could start by checking the following things:

  • Make sure that your sshd service is running
  • Check if port 22 is open via your firewall

Your server firewall (UFW) is likely rate-limiting SSH connections. Verify this by checking your firewall status: sudo ufw status numbered.

     To                         Action      From
     --                         ------      ----
[ 1] 22/tcp                     LIMIT IN    Anywhere
[ 2] 443/tcp                    ALLOW IN    Anywhere
[ 3] 80/tcp                     ALLOW IN    Anywhere
[ 4] 22/tcp (v6)                LIMIT IN    Anywhere (v6)
[ 5] 443/tcp (v6)               ALLOW IN    Anywhere (v6)
[ 6] 80/tcp (v6)                ALLOW IN    Anywhere (v6)

Note if your 22/tcp rule has an action of LIMIT or LIMIT IN. You can address this in one of two ways:

  1. Configure Filezilla to use a maximum of 1 simultaneous connection(s): File > Site Manager > Transfer Settings
  2. Stop rate-limiting SSH on your server. You can remove rules using sudo ufw delete # — where # is the number of the corresponding rule. IMPORTANT: if you delete the rule, make sure you allow connections over port 22 before you log out, otherwise you’ll lock yourself out of your server.

Allow SSH from everywhere: sudo ufw allow ssh

Allow SSH from specific IP: sudo ufw allow from {YOUR_IP_HERE} to any port 22