-2

I have a server which has a low storage problem. What i want is to mount the user ec2-user's home directory that is /home/ec2-user to another attached storage drive which is available at /dev/xvdk and its partitioned as xfs and the partition is /dev/xvdk1. So what i did is login as bob and rename /home/ec2-user to /etc/ec-user-backup/ and then rsync all files to the extra attached storage in /dev/xvdk1. Then mount that drive at /drive2. So now the c2-user's home directory is present at /drive2/ec2-user/. Now I create a symlink in /home/ec2-user which points to /drive2/ec2-user.

I also update the /etc/fstab accordingly. Check with mount -a. ec2-user's home directory has moved to new storage and is working.

The problem arises when i try to ssh in as ec2-user. The ssh key that was working previously has stopped working now. I have looked at the permissions on user's .ssh and all files under this and they seem to be alright. which is 600. Also im able to login in with password but not the ssh key.

What am i missing?

11
  • Check the server logs.
    – Jenny D
    Jan 1, 2016 at 20:07
  • @JennyD which logs in specific. And what should I be looking for. Jan 1, 2016 at 21:38
  • If you don't know which logs then this isn't the site for your question.
    – user9517
    Jan 1, 2016 at 21:42
  • @Iain what are you suggesting? Jan 2, 2016 at 2:49
  • 1
    The logs for the service you are trying and failing to connect to. In this case, sshd. And yes, knowing which logs to look at is part of the criteria for a question being valid on this site. See serverfault.com/help/how-to-ask for more information on that.
    – Jenny D
    Jan 2, 2016 at 10:28

1 Answer 1

2

The .ssh directory needs to have u+x permission set too

chmod u+x /home/ec2user/.ssh 
1
  • This has no effect. Jan 1, 2016 at 21:37

Not the answer you're looking for? Browse other questions tagged .