SSH and SFTP stop working after ufw enable

Hello,

I trying to setup ssl and i haev enable ufw using below command
sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup

After enable ufw i am not able to connect ssh and sftp.

Anyone please provide solution or possible way to fix this issue

2 Replies

Log into lish and add the UFW Rule

sudo ufw allow 22

Add any additional ports that need to be allowed too.

Greetings @Rigal,

If you're still having trouble, we recommend logging in via LISH and going through the following Community Post.

https://www.linode.com/community/questions/400/why-cant-i-connect-to-my-linode-via-ssh

To start, run the SSH command verbosely and see where it is breaking:

$ ssh -vv [email protected]

Once logged in via LISH, take a peek at your SSH configurations:

$ egrep -i '(password|permit|port|rsa|Allow|Deny)' /etc/ssh/sshd_config

Also, double check the firewall rule LouWestin mentioned with:

$ sudo ufw status

Don't forget to @ us so we get pinged on your response!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct