When i tried ssh using root access
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:PSQnv/ajononHTf15aPXn8WHG5OjLIK6DozzlmQrtw4 /Users/enz/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: fp SHA256:PSQnv/ajononHTf15aPXn8WHG5OjLIK6DozzlmQrtw4
debug3: sign_and_send_pubkey: RSA SHA256:PSQnv/ajononHTf15aPXn8WHG5OjLIK6DozzlmQrtw4
debug3: send packet: type 50
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
it can continue, but when i tried ssh using the user that i create
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:PSQnv/ajononHTf15aPXn8WHG5OjLIK6DozzlmQrtw4 /Users/enz/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug1: Trying private key: /Users/enz/.ssh/id_dsa
debug3: no such identity: /Users/enz/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /Users/enz/.ssh/id_ecdsa
debug3: no such identity: /Users/enz/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /Users/enz/.ssh/id_ed25519
debug3: no such identity: /Users/enz/.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
c_rs@lupa.cukopi.com: Permission denied (publickey).
i’m already create .ssh folder and authorize_keys
anyone can help me with it?
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 @MSNK:
I am facing this issue… can anyone please help?
Hello there,
As per Bobby’s comment, you need to add your public key to the authorized_keys
file.
You can check our article on How to Upload an SSH Public Key to an Existing Droplet
https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/to-existing-droplet/
You can access the droplet from the DigitalOcean console and then temporary enable the PasswordAuthentication on your droplet and access the droplet with a password to upload the ssh-key.
If you haven’t created new pair of keys you’ll need to do that first.
You can enable PasswordAuthentication for your Droplet by modifying your /etc/ssh/sshd_config
file. Once set to Yes restart the SSH service and connect via an SSH client for a more stable connection. You can then modify your ~/.ssh/authorized_keys
file to add the appropriate public key.
This change can be made from DigitalOcean’s console. If you’re having issues accessing the console you can then reach to our amazing support team that can help you further with this.
To enable the PasswordAuthentication
follow these steps:
sudo nano /etc/ssh/sshd_config
PasswordAuthentication
from “no” to “yes” and save the filesudo nano ~/.ssh/authorized_keys
sudo nano /etc/ssh/sshd_config
PasswordAuthentication
from “yes” to “no” and save the fileYou can then upload the key using this command:
ssh-copy-id -i ~/.ssh/mykey user@droplet
Hope that this helps! Regards, Alex
Hello,
You need to add your SSH key to your user’s /home/user/.ssh/authroized_keys
file in order to be able to ssh.
Also, you need to make sure that the /home/user/.ssh
and the authorized_keys
file has secure permissions.
Regards, Bobby
This comment has been deleted
I am facing this issue… can anyone please help?