• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

Key-Based SSH Prompting Password

February 21, 2023

Key-based SSH login is prompting a password despite it’s already setup to use keys. As turns out, the home directory was changed to 777. To fix, I changed home folder permissions and restarted SSH. It probably does not need a restart, but it doesn’t hurt.

chown -R username:username /home/username
find /home/username -type d -exec chmod 755 {} \;
find /home/username -type f -exec chmod 644 {} \;

chown -R username:username /home/username find /home/username -type d -exec chmod 755 {} \; find /home/username -type f -exec chmod 644 {} \;

sudo systemctl restart ssh

sudo systemctl restart ssh

Filed Under: Misc

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023