![]() To test, I logged out of my VPS, then attempted to log back in. Then, I updated the AuthorizedKeysFile parameter in /etc/ssh/sshd_config:ĪuthorizedKeysFile /etc/%u/authorized_keysįinally, I restarted the SSH service. Next, I moved my authorized_keys file into /etc/aritdev/. To get around this, I created a directory named after my username aritdev outside of my home directory (I chose /etc/), and gave it full permissions for myself, but read-execute permissions for everyone else. We must have password-based authentication enabled to use this method. It’s included in the OpenSSH packages in most Linux distributions, so we don’t need to install it. It’s the easiest and most recommended method for copying a public key. Subsequent connections will succeed without a password, since the SSH service will then be able to read my authorized_keys file in my decrypted home directory. ssh-copy-id is a utility to copy the public key to a remote SSH server. Therefore, my first connection attempt will require a password. ![]() However, my authorized_keys file is stored in my home directory. Still, I kept getting prompted for a password upon login from my laptop.Īfter a few minutes on StackOverflow, I learned about Encrypted Home Directories, which are default in some environments, including Ubuntu.Įncrypted home directories aren’t decrypted until the initial login is successful.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |