ssh port 22: Connection refused

I just created a linode account and was successfully use ssh to login form my PC

Then after I reboot my PC I am getting an error:

ssh: connect to host port 22: Connection refused

Any thoughts why it is happening?

6 Replies

Probably ssh is not running on your Linode for some reason. Use netstat -lvpnut as root to see if ssh is listening on port 22. If that's not the problem, it's also possible that the firewall on your Linode or on your home PC is blocking the connection. You can get to your Linode using Lish to check what's going on.

This is not a good answer. Please try to be clearer in your response. How do you use netstat-Ivpnut as root? You just typed something without much value

Linode Staff

To run a command as root, there are two options I'd recommend.

1: Log in as root

2: Run sudo -i while logged in as another user with sudo access. This will put you into an interactive shell as root.

If you're having trouble accessing your Linode via SSH, we have a troubleshooting guide that may be helpful here:

Reolved. Thanks

This started happening to me after installing a self-signed certificate using apache/mod_ssl. Is this conflicting? I installed while connected to a terminal via ssh and it didn't boot me.

I'm seeing this for netstat -lvpnut (below). Should ssh be on :::22?

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0* LISTEN
tcp 0 0* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::443 :::* LISTEN
udp 0 0*
udp6 0 0 ::1:323 :::*

Never mind, turns out a local router had google spyware on it (Google Opinion Rewards) and was hijacking traffic. No server issues.


Please enter an answer

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] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct