SSH Permission Denied with Full Disk Encryption
When I powered on an Ubuntu machine with full disk encryption, unlocked the drive, and attempted to SSH to the box, I received Permission denied (publickey).
This meant sshd
was running and interestingly after loggging into the local terminal I was able to SSH to the box. Turns out, since my home directory was also encrypted, my authorized_keys
file couldn’t be read.
The solution was to add AuthorizedKeysFile /etc/ssh/authorized_keys
to /etc/ssh/sshd_config
and then add my public key to /etc/ssh/authorized_keys
.
Now I’m able to SSH after the drive is unlocked and run ecryptfs-mount-private
to decrypt my home directory.