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 xxx.xxx.xxx.xxx port 22: Connection refused

Any thoughts why it is happening?

8 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

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: https://www.linode.com/docs/troubleshooting/troubleshooting-ssh/

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 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::443 :::* LISTEN
udp 0 0 127.0.0.1:323 0.0.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.

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

@hoohost what does this mean?

@hoohost what does this mean?

It means that whoever set up the router didn't know what s/he was doing.

-- sw

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