Question

Unable to connect Droplet through SSH

Hi, We were able to connect to Droplet previously, but since a month or two we are not able to connect due to SSH keys issue.

$ ssh -v venu@IP OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling debug1: Connecting to IP [IP] port 22. debug1: connect to address IP port 22: Connection timed out ssh: connect to host IP port 22: Connection timed out

Almsot we tried all the possible ways, Appreciate if any suggestions Thank You Venu Kommu


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.

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.

Dear @alexdo, Thank you for your reply.

It seems already port 22 is enabled. See the output following, https://pasteboard.co/IXeddld.png

Apprecaite your help

Hello, @venukommu

From what it seems like port 22 (ssh) is either closed or it’s not enabled for external access via the Firewall.

What you can do is to access your droplet using the console from your DigitalOcean control panel and check everything from there.

First you can make sure that sshd is running using the following command:

netstat -plunt | grep 22

If sshd is running then you can then make sure that ssh is allowed via the the firewall configuration tool.

You can make sure that UFW is running:

sudo ufw status

If it says it’s inactive you can enable it using this command:

sudo ufw enable

To allow all incoming SSH connections run this command:

sudo ufw allow ssh

An alternative syntax is to specify the port number of the SSH service:

sudo ufw allow 22

To allow incoming SSH connections from a specific IP address or subnet, specify the source.

sudo ufw allow from IPaddress to any port 22

Once this is done you can try to ssh again with the -vvv argument as it will show you a more verbose output.

Let me know how it goes.

Regards, Alex