Ubuntu first time deployment cant connect with putty ssh

September 28, 2016 239 views
DigitalOcean VPN Networking Ubuntu 16.04

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.

  • Are you able to ping your Droplet's IP address? Also, do you see any errors in the Web Console or just a login prompt? Sometimes it takes a minute or two for all services to start up (especially for the first time) after creating a Droplet.

  • Thnx for the reply, but i discovered that my ISP is blocking port 22 and cant port forward for it unfurtunately.

  • 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.

Be the first one to answer this question.