Question

I can't login from my laptop to the server. what am I doing wrong ?

Posted August 21, 2020 266 views
Getting StartedDigitalOcean

I am not able to log in with the ssh method.
i might need help

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.

×
2 answers

what is the problem? is you first time to login?

Hi, @piombinilorenzo1987

Would you mind sharing the exact error message that you’re currently getting when you try to login? Also are you using a ssh client like PuTTy or you’re connecting via terminal?

You can follow our existing tutorial on how to connect to droplets with SSH:

https://www.digitalocean.com/docs/droplets/how-to/connect-with-ssh/

Hope that this helps!
Regards,
Alex

  • The following is my cmd prompt

    C:\Users\Lorenzo Piombini>cd .ssh

    C:\Users\Lorenzo Piombini.ssh> ssh -i private root@droplet-ip
    Warning: Identity file private not accessible: No such file or directory.
    root@droplet-ip: Permission denied (publickey).

    C:\Users\Lorenzo Piombini.ssh>ssh root@droplet-ip
    root@droplet-ip: Permission denied (publickey).

    C:\Users\Lorenzo Piombini.ssh>

    and the first time the console gave me the message
    are you sure you want to login (yes/no).

    it is not exactly the warning message i got when I tried to log in the first time, however, there is some problem with the publickey I believe,

    I used PuTTY to create a SSH during the creation process.

    Thank you so much for your help
    Lorenzo

    • Hi, @piombinilorenzo1987

      Thanks for coming back.

      The first error message:

      C:\Users\Lorenzo Piombini.ssh> ssh -i private root@droplet-ip
      Warning: Identity file private not accessible: No such file or directory.
      root@droplet-ip: Permission denied (publickey).
      

      is quite self explanatory, the key was not find - No such file or directory.

      If you try to ssh from linux machine there is an option to specify the key with the ssh command using the -i

      -i identity_file
      Selects a file from which the identity (private key) for public key authentication is read.  The default is ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519 and ~/.ssh/id_rsa.  Identity files may also be specified on a per-host basis in the configuration file.  It is possible to have multiple -i options (and multiple identities specified in configuration files).  If no certificates have been explicitly specified by the CertificateFile directive, ssh will also try to load certificate information from the filename obtained by appending -cert.pub to identity filenames.
      

      The second error refers that something might be wrong with the ssh-ley itself:

      C:\Users\Lorenzo Piombini.ssh>ssh root@droplet-ip
      root@droplet-ip: Permission denied (publickey).
      

      You can also access the droplet using the console from your account and check if the ssh-key added on the droplet is correct. Another option is to create a new key and upload it to your droplet and try to access the droplet from the cmd again.

      Hope that this helps!
      Regards,
      Alex

Submit an Answer