I was able to connect to my xubuntu system installed in a virtual box via ssh from my PC (running Ubuntu 16.04):

ssh vtm@

Later, in the same machine (xubuntu) I executed the following commands to enable FTP access:

sudo ufw disable
sudo iptables -F

Now I cannot connect to it via ssh, I get the following error:

ssh: connect to host port 22: Connection timed out

How can I solve this issue?


Can you please restart your computer to undo this iptables -F?

If you want to allow FTP why not running: ufw allow 21/tcp ufw enable

next please install nmap and check if the port is reachable at all: apt-get install nmap

then: nmap -p 22 and nmap -p 21

Post the results, I am curious if the ports are reachable at all.


The problem was that ssh was not allowed by the firewall, so :

sudo ufw allow ssh

solved my problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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