Can't connect my Linode via SSH or Filezilla
I install clamav and scan my Linode. After that I can't connect linode using SSH or Filezilla. Before that its working fine. While typing SSH command in windows terminal and try to connect its always says ssh: connect to host linode_ip port 22: Connection refused. I tried this community post but nothing happen.
Hey @iswap - that Community post is a great place to start. The idea behind it is to figure out where the SSH attempt is failing so that you can narrow down what needs to be fixed.
There are a few reasons your SSH connection could be rejected in general:
- Incorrect username/password
- The port is closed
- Your SSH service isn't running
- Firewalls are preventing access
- SSH isn't installed
Since you were able to log in before running ClamAV, SSH sounds like it's installed, so the issue is most likely one of the other reasons I listed above. Here's what I would recommend:
- Log into your Linode via the Lish console in the Cloud Manager. Enter your root username and password. If that doesn't work, you can take steps to change your root password and try again. Friendly reminder that if you change your root password, you will need to update your FileZilla credentials to account for the new password.
- Once you're logged in through Lish, restart your SSH service:
service ssh restart
Once SSH has restarted, try connecting again.
- If that doesn't solve the issue, check your firewall rules to see if anything is blocking port 22. I'm not sure which firewall program your server is using, but iptables is the most common. Here's the iptables command to check your current ruleset:
If you're not using iptables, UFW is another pretty common firewall program. Here's our guide to using UFW if you need it: How to Configure a Firewall with UFW
I know this may seem like a lot, but hopefully it helps narrow things down for you!