I'm wondering if I made a mistake or if this is the normal case. I turned off password based ssh login and changed it to RSA key exchange. After that I changed the ssh port and then I installed UFW. I added ssh to UFW rules and turned UFW on. After that the login via ssh became very slow (>30 seconds). Before it was just some milliseconds. Is this normal or did I something wrong? I'm very new as ubuntu server admin. I hope you can help me to track down this issue.

Thanks a lot


I saw this problem last night.

$ sudo ufw allow ssh
$ sudo ufw enable

Didn't affect my current ssh session, but it did cause a significant delay with ssh logins. For example, an ssh login like below would hang for some period of time before (finally) prompting for a password:

$ ssh myusername@mydomain.com

(wait for 40 seconds or longer until...)

myusername@mydomain.com's password:

Of course, this delay would go away after disabling ufw with $ sudo ufw disable.

I have used ufw many times before and have never seen this problem. At any rate, the issue has since disappeared and I can only assume that it is because I ran an update upgrade and reboot last night before heading to sleep.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo reboot

If that doesn't solve the issue for you, and there are packages being held back, then you might try dist-upgrade:

$ sudo apt-get dist-upgrade
$ sudo reboot

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.