Question

ssh access to remote machine

Posted September 1, 2020 152 views
Ubuntu 18.04

I have set up a local Ubuntu desktop and port forwarded 22 so I can ssh access it from internet. Works fine.
From other ip addresses ssh user@ip returns user@ip’s password: and I can log in
From Ubuntu droplet terminal ssh user@ip returns Permission denied (publickey,password)

How do I configure droplet Ubuntu to allow desktop log in?

FYI I access droplet Ubuntu using ssh key pairs

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.

×
1 answer

Hi there @jeffki,

You can enable password authentication by following the steps here:

https://www.digitalocean.com/docs/droplets/resources/lost-ssh-key/#enable-password-authentication

If you are still unable to login, I would recommend adding the -v flag to your SSH command to get some debug information:

  • ssh -vvv user@ip_address

Regards,
Bobby

  • Bobby
    Thanks for your reply. My problem is not logging into the droplet, it is once in the droplet trying to ssh to a remote ssh server.
    I note the following from -vvv debug:
    i get connection established to user@ip port 22
    then:
    debug1: keyloadpublic: No such file or directory
    debug1: identity file /home/jeff/.ssh/idrsa type -1
    debug1: key
    loadpublic: No such file or directory
    debug1: identity file /home/jeff/.ssh/id
    rsa-cert type -1
    debug1: keyloadpublic: No such file or directory
    debug1: identity file /home/jeff/.ssh/iddsa type -1
    debug1: key
    loadpublic: No such file or directory
    debug1: identity file /home/jeff/.ssh/id
    dsa-cert type -1
    debug1: keyloadpublic: No such file or directory
    debug1: identity file /home/jeff/.ssh/idecdsa type -1
    debug1: key
    loadpublic: No such file or directory
    debug1: identity file /home/jeff/.ssh/id
    ecdsa-cert type -1
    debug1: keyloadpublic: No such file or directory
    debug1: identity file /home/jeff/.ssh/ided25519 type -1
    debug1: key
    load_public: No such file or directory

    it does get the key for ip
    Host ‘x.x.x.x’ is known and matches the ECDSA host key.

    it exits with:
    debug3: authmethodisenabled publickey
    debug1: Next authentication method: publickey
    debug1: Trying private key: /home/jeff/.ssh/idrsa
    debug3: no such identity: /home/jeff/.ssh/id
    rsa: No such file or directory
    debug1: Trying private key: /home/jeff/.ssh/iddsa
    debug3: no such identity: /home/jeff/.ssh/id
    dsa: No such file or directory
    debug1: Trying private key: /home/jeff/.ssh/idecdsa
    debug3: no such identity: /home/jeff/.ssh/id
    ecdsa: No such file or directory
    debug1: Trying private key: /home/jeff/.ssh/ided25519
    debug3: no such identity: /home/jeff/.ssh/id
    ed25519: No such file or directory
    debug2: we did not send a packet, disable method
    debug1: No more authentication methods to try.
    user@x.x.x.x: Permission denied (publickey,password).

    Looks like the Ubuntu droplet openSSH is not getting a public key to use to connect to my ssh server? Not sure how to configure this?

    Best regards
    Jeff

Submit an Answer