When I change port from 22 to 2200 in Putty the Putty terminal cannot connect to the digital ocean droplet

June 6, 2019 176 views
Deployment DigitalOcean Firewall Getting Started Initial Server Setup

WHEN I CHANGE PORT INSIDE PUTTY SSH FROM PORT 22 TO PORT 2200. The connection refused message pops up please help

1 Answer

Hello,

In order to connect the server on a non-standard SSH port you need to make sure that:

  • Your SSH service is actually configured to listen on port 2200, to check that connect to your server (you can use the DigitalOcean web console in your control panel) and run this command:
netstat -plant | grep -i ssh

There you should be able to see what is the port that your SSH service is listening on, if it is not 2200 then you need to use the port that you see there.

  • Check if port 2200 is opened via your firewall:
ufw status

If you do not see port 2200 there, then you could open it with this command here:

ufw allow 2200/tcp

Hope that this helps!
Regards,
Bobby

Have another answer? Share your knowledge.