I have Ubuntu 18.04 on both desktop and server. Trying to login as user (not root) to server with ssh fails with "Permission denied (publickey)". SSH worked before with server being 16.04, but not now after fresh install. I would love to post the output with ssh -vvv option but I get the "This looks like spam" objection here in Askubuntu. When I edit sshd_config to allow passwords I can login that way.

  • 1
    Upload the output of ssh -vvv to pastebin and include a link to it in your question – Hee Jin May 15 '18 at 17:09
  • When I set StrictModes to no it works, but I can't work out what permissions I should set. I set .ssh to 700 on both client and host machine, but no go. – Mårten May 16 '18 at 18:21

Solved. Double checking the permissions in my home directory on the host showed I had it writable by my group. My bad.

| improve this answer | |
  • I solved it by changing the permissions from the id_rsa and id_rsa.pub file to 700. – mhellmeier Dec 29 '18 at 21:06

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.