Question

SSH permission Denied

Hi

2 weeks ago I format my pc to ubuntu 17.10.Then I try to log in my server but it refuses.

  • I create rsa keyin my pc. and put it from droplet panel first but it refuses again (permission denied) then tried DO ssh setting (how to use ssh key) , it refuses again
  • I changed ssh_config, add password authentication pubkey auth, rsa auth, it refuses permision denied
  • I remove .ssh folder from root and user in droplet, it refuses again

output /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 2 key(s) remain to be installed – if you are prompted now it is to install the new keys Permission denied (publickey).

or

debug1: Offering RSA public key: /home/selo/.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: Offering RSA public key: /home/selo/.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: /home/selo/.ssh/id_dsa debug3: no such identity: /home/selo/.ssh/id_dsa: No such file or directory debug1: Trying private key: /home/selo/.ssh/id_ecdsa debug3: no such identity: /home/selo/.ssh/id_ecdsa: No such file or directory debug1: Trying private key: /home/selo/.ssh/id_ed25519 debug3: no such identity: /home/selo/.ssh/id_ed25519: No such file or directory debug2: we did not send a packet, disable method debug1: No more authentication methods to try. Permission denied (publickey).

what must I do?

note: I read all question about ssh in do

thanks


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This worked for me:

chmod go-w ~/ chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys

https://www.howtogeek.com/168156/fixing-authentication-refused-bad-ownership-or-modes-for-directory/

DO host from droplet console root and user

chmod 700 .ssh chmod 600 .ssh/authorized_keys

copy ur pub with wget cat publickey > .ssh/authorized_key (root and user)

solved

can u write ur do and local ssh_config pls?