5 Responses to “2 Simple Steps to Set up Passwordless SSH Login on Ubuntu

  • MrAdminus
    2 years ago

    Thank you for sharing the way howto store the key passphrase in the SSH Agent!

  • great article on this topic

    it will be very good if you update it time to time because of 2106 publish date…


    • Hi vahid,

      Thanks for your suggestion. I just modified a code on my website. Now the article update time is displayed, instead of the article publish time.

  • This was the most informative article, didn’t know about ssh-copy-id. But it still didn’t work.

    Here are my trouble shooting steps to get it to work:

    1) edited /etc/ssh/sshd_config ;set “LogLevel DEBUG”; restarted service

    2) /var/log/messages showed selinux blocking access to authorized keys; recommended action in the log didn’t work . Just disabled selinux … it’s a Virtualbox VM … rebooted

    3) /var/log/messages showing
    sshd[13969]: Authentication refused: bad ownership or modes for directory /home/meh/.ssh

    4) set them
    > chmod g-w /home/meh
    > chmod 700 /home/meh/.ssh
    > chmod 600 /home/meh/.ssh/authorized_keys

    Finally worked.

  • Thanks

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB.
You can upload: image.