Question

Ubuntu first time deployment cant connect with putty ssh

After have created a ubuntu 16.04 droplet with a ssh key for the first time and then use putty to connect to it , display an error of “network error, connection time out”. The service is up but i cant connect to it.

Show comments

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.

This question was answered by @ryanpq:

We’ll that’s a problem but here is how you can work around it.

  • Create a new droplet without your ssh key. A password will be emailed to you.
  • Log into your droplet via the console and modify your /etc/ssh/sshd_config to change the port that ssh is using to something your ISP is not blocking.
  • Restart SSH with service ssh restart
  • Log in via ssh and paste your key into /root/.ssh/authorized_keys (you can also change your PasswordAuthentication value so that the key must be used.

Now at this point, if you want, you can create a snapshot of your droplet. In the future you can use that snapshot to create new droplets with ssh running on the new port you defined without having to go through the extra steps.

View the original comment