I moved my home directory from /home/user to /media/newDrive/home/user.

Everything seems to be working at first, except my ssh configuration. I was able to log into this machine from my laptop with an authorized key.

Certainly nothing changed. However, now I find that I need to provide my password. This is not what I want. I want to use the authorized_keys that is setup.

Much thanks in advance.

  • sudo rsync -aXS --exclude='/*/.gvfs' /home/. /media/newDrive/home/. Mar 15 '15 at 18:33
  • sudo diff -r /home /media/home Mar 15 '15 at 18:35
  • 1
    How is newDrive formatted? ssh is picky about the ~/.ssh directory and file permissions, if the filesystem doesn't support *nix-style permission bits it may reject the keys. Regardless, you should run your ssh client in verbose mode ssh -vvv user@host to see exactly why it's failing. Mar 15 '15 at 21:31
  • 1
    ntfs is a poor choice for your files and directories in /home as ntfs does not support linux permissions and you run into these sorts of problems. back up your data and format the removable device to ext4 or the linux file system of choice.
    – Panther
    Mar 15 '15 at 23:24

There are a few things that you may need to check:

  1. Ensure that the /home/user/.ssh directory has been copied to /media/newDrive/home/user/.ssh

  2. Ensure that the containing directory, /media/newDrive/home/user, has the correct owner/permissions.

cp -R /home/user/.ssh /media/newDrive/home/user/.ssh cat /home/user/.ssh/authorized_keys chown $USER.$USER /media/newDrive/home/user chmod 755 /media/newDrive/home/user

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.