Skip to content

Instantly share code, notes, and snippets.

@dasegn
Created July 15, 2014 23:16
Show Gist options
  • Save dasegn/27fe1234289c4ee1c248 to your computer and use it in GitHub Desktop.
Save dasegn/27fe1234289c4ee1c248 to your computer and use it in GitHub Desktop.
Toma en cuenta al archivo authorized keys si la carpeta de home está encriptada
# Make your public key accessible
mkdir -m 700 /home/.ecryptfs/$USER/.ssh
echo $YOUR_PUBLIC_KEY > /home/.ecryptfs/$USER/.ssh/authorized_keys
ln -s /home/.ecryptfs/$USER/.ssh/authorized_keys ~/.ssh/authorized_keys
ecryptfs-umount-private
chmod 700 $HOME
mkdir -m 700 ~/.ssh
ln -s /home/.ecryptfs/$USER/.ssh/authorized_keys ~/.ssh/authorized_keys
# Make it auto-mount with first login.
# Note: it can cause problems with automated login.
echo /usr/bin/ecryptfs-mount-private > ~/.profile
echo cd >> ~/.profile
echo source .profile >> ~/.profile
ecryptfs-mount-private
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment