Encrypted home prevents ssh access with keys

Bug #319909 reported by bodhi.zazen
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
encfs (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I installed ubuntu 9.04 Alpha 3 and elected to encrypt my home directory.

All went well, but I could not figure out why I could not ssh into my server (I use keys) ...

It was odd in that I could ssh in as another user, su to my admin user, and then I could ssh in with my admin user :)

I use keys and so the default location (I use) was in ~/.ssh/authorized_keys

LOL !!!

Revision history for this message
bodhi.zazen (bodhi.zazen) wrote :

OK, so an easy fix, well work around

store the keys outside of $HOME and re-configure /etc/ssh/sshd_config

Add say :

AuthorizedKeysFile /etc/authorized_keys

restart sshd

now you can ssh with keys, but when you do $HOME is STILL encrypted.

from there su <user> and it decrypts

Long work around I know ;)

Revision history for this message
Alroger Filho (alroger-cafe-ti) wrote :

That doesn't really help.
I do want to keep all my keys encrypted. I have access to several client's servers and don't want those keys to be avail to anyone who steels my PC or notebook.
Why doesn't SSH work with it's .ssh dir encrypted?

I also tried encrypting only a directory with encfs, and moving .ssh inside it, then creating a symlink to ~/.ssh.. but sshd refuses to work with it.

Any ideais?

Revision history for this message
Alroger Filho (alroger-cafe-ti) wrote :

Just figured it out for me. Only authorized_keys must be outside the encrypted directory, for sshd will use it before any user log.
Your actual keys and known_hosts can be inside the encrypted dir, only with symbolic links to a .ssh directory that is not encrypted.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in encfs (Ubuntu):
status: New → Confirmed
Revision history for this message
Helder (he7d3r) wrote :

I'm having this problem on Ubuntu 12.04.

The command "restart sshd" results in
restart: Unknown job: sshd

Revision history for this message
Adam Porter (alphapapa) wrote :

H2G, that's a different bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.