2

Yesterday i made a new installation of Ubuntu 18.04.

Problem I'm trying to connect to my Digital Ocean vps like always with the ssh user@ip command but it gets stuck.

Things i tried

  1. Tried to show verbose with ssh user@ip -vvv. It get stuck in "Debug1: Connecting...", and after some time shows a "connection timed out".
  2. Firewall is disabled, so i'm sure is not this
  3. Port 22 is open
  4. Digital Ocean is OK, because i can connect with my mac with the same command
  5. Pinging the domain shows me the correct ip, so i think it's resolving correctly.
  6. nmap and ssh on localhost is working

Edit:

Doing a tcptraceroute server_ip 22 stucks in 3 asteriscs (***)

Thanks for your help

0

It might be because you haven't added a new public ssh key to the authorized_keys file on the vps? If that's the case: In your Ubuntu 18.04 terminal, enter

sudo ssh-keygen

Make your new ssh key (and password for ssh key, depending on your security needs). Then enter this when you're finished:

cat ~/.ssh/id_rsa.pub

This will display your public key, which you'll need in a minute for copying and pasting.

Keep that terminal open and either log in as root on your mac or go to digitalocean.com, login, click on your droplet, click on "Access" to your left, then the big blue button "Launch Console". When the new window pops up, log in as root.

Then enter the following, substituting the public key you made on Ubuntu 18.04 for xyz, keeping the double quotes:

echo "xyz" >> ~/.ssh/authorized_keys

Now try logging in as usual.

  • Thansk for your answer but i already added the key to my droplet as always. And i think that if ssh key was wrong the machine would return another error, not a time out. If i execute the ssh connection without -vvv i get the following message: ssh: connect to host website.com port 22: No route to host – BufferOverflow Sep 23 '18 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.