If You Want to Log in Without a Password Using an SSH Key File on a Server, It’s Better Not to Use "Home Directory Encryption"

Linux
2018-01-10 06:40 (8 years ago)
If You Want to Log in Without a Password Using an SSH Key File on a Server, It’s Better Not to Use "Home Directory Encryption"

Depending on the use case, this serves as a personal memo. Ubuntu.

When enabling home directory encryption and placing the public key in ~/.ssh/authorized_keys, it cannot be read by sshd because it is encrypted. As a result, even though you are trying to log in via SSH with a private key, you will be prompted for a password every time.

There is an option to place the public key outside the home directory.

However, in this case, you won't be able to access the encrypted home directory after logging in via SSH, rendering home directory encryption pointless.

For my use case, this was redundant, so I disabled home directory encryption.

The method to disable it is as follows:

How to Disable Home Folder Encryption After Installing Ubuntu

(Delete  /home/.ecryptfs/ to remove all encrypted information, and then run sudo apt-get remove ecryptfs-utils libecryptfs0)

Please rate this article
Currently unrated
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.

Categories

Archive