Question

I have port 22: Operation timed out on my droplets

Tomorrow I made a droplet and this morning I have the error

ssh -vvvv root@165.232.147.254
OpenSSH_8.6p1, LibreSSL 2.8.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug2: resolve_canonicalize: hostname 165.232.147.254 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/vsshnayder/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/vsshnayder/.ssh/known_hosts2'
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug3: ssh_connect_direct: entering
debug1: Connecting to 165.232.147.254 [165.232.147.254] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: connect to address 165.232.147.254 port 22: Operation timed out
ssh: connect to host 165.232.147.254 port 22: Operation timed out

I haven’t server passowrd and using ssh key to connect to server

Please help me to connect


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hi @volodyaschneider,

It seems to me like your IP address is not allowed to reach port 22 or the method you are using to authenticate is not turned on by the droplet.

Having said that, most probably the issue is with port 22. In such cases, you’ll need to use the DigitalOcean’s Recovery Console to get access to your Droplet back and allow SSH connections.

Check the following documentation about the matter:

https://docs.digitalocean.com/products/droplets/resources/recovery-console/

Following the steps, there will allow you to gain access to your Droplet and allow connections for your IP on port 22.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello, @volodyaschneider

If you filter any traffic to your droplet via a Cloud Firewall you can temporary disable all rules in order to regain access to your server.

https://docs.digitalocean.com/products/networking/firewalls/

On the other hand if you filter traffic on port 22 via UFW you can then use the DigitalOcean console as per KFSys’s suggestion in order to restore the normal access to your droplet.

https://docs.digitalocean.com/products/droplets/resources/recovery-console/

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-20-04

Hope that this helps! Regards, Alex