Connection Refused on using port 7811

I’m following the Stake Pool Course and tried to set up a VPS with ssh. On rebooting, I’m not able to connect using the same ssh via port 7811 as I get an error ‘Connection refused’.
Very strange. Could someone help me out here pls?
Thank you!

Hi Morgan,

How did you SSH into the node prior to making the changes (provide command w/ obfuscated ip)?

What changes did you make?

How are you trying to shell in now?

Thanks in advance

Your friend, FROG


Thanks for your reply.

I was able to log into the root@IP via ssh before.

ssh -i ~/.ssh/id_rsa root@IP

I changed the PORT from 22 to 7811

nano /etc/ssh/sshd_config

And then by limiting access via firewall settings.

ufw limit proto tcp from any to any port 7811

Followed every step as Carlos does in the course video.

Any suggestions?

Once again, thank you!

Ok I don’t think you locked yourself out … whew!

You will need to specify the new port in your SSH command:

ssh -i ~/.ssh/id_rsa root@IP -p 7811

Now I recommend you follow this guide for how to disable root login - as you do not want to be running as root user:

I also recommend changing your SSH port again as you’ve posted it publicly, which somewhat defeats the purpose of changing the port):

Here is a thread to review as well:

Your friend, FROG


Thanks for the message.

I specified the port on trying to log in actually.
ssh -i ~/.ssh/id_rsa root@IP -p 7811

It still gave me the error - Connection Refused.

On contacting support from the VPS provider they said…
“I scanned your server’s port 7811 and there seems to be a firewall blocking it.”

But on running the status check…
sudo ufw status

I see that the Action and From parameters for the port 7811/TCP and 7811/TCP (V6) is as it should be.
Action: LIMIT
From: Anywhere

I will change the port, trying to understand why I’m not able to log in as both root and non root.


Hi Morgan,

The only think I can think of is perhaps your VPS provider offers default firewall or security rules / zones that can be customized and applied externally across one or more vm instances - with the default having port 22 accessible and not yet configured to accommodate your new SSH port configuration. If that’s the case, these rules would take precedence to filtering connections before they reach your vm.

I truly hope this is the issue.

Your friend, FROG

Thanks, Frog.

I’m a little lost here. The tech support responded saying that there seems to be a firewall setting blocking the port and asked me to check the status.

If it was the case as you say, then they would have have simply told me that to be the case.

I appreciate your time and responses. I’m not sure what to do here except cancel my subscription with current vps provider and move to another one.

My pleasure, Morgan.

In my experience support can vary drastically based on the representative taking your call - so it might be worth a long shot calling back in. I would just recommend poking around your vps dashboard is all unless you’re confident security groups are not present (such as would be if the vps was using OpenStack for example).

Best of luck



Thanks for the tip on checking with another support.

I did and here’s what they said…

" Before changing your default SSH port to 7811, did you verify and confirm that this port was opened to traffic? Because we scanned your server and the port appears to be closed.

Starting Nmap 7.40 ( ) at 2020-08-21 17:18 EDT

7811/tcp closed unknown "

Do you know how I could check what ports are available before using them for the node?

Any tips, much appreciated!


Managed to resolve the issue with another random port number.

1 Like

Hi Morgan,

Here’s a simple tool you can use in the future to validate ports are open:

Your friend, FROG

FROG, you. are. awesome.

1 Like

:facepunch: :frog: