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-userto another attached storage drive which is available at
/dev/xvdkand its partitioned as
xfsand the partition is
So what i did is login as
rsyncall 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-userwhich points to
I also update the
/etc/fstabaccordingly. Check with
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
.sshand 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?
.ssh directory needs to have
u+x permission set too
chmod u+x /home/ec2user/.ssh
Source : Link , Question Author : Saad Masood , Answer Author : user9517