I recently messed around with the .ssh directory. Made some permission changes, I think and now it won't let me access it anymore. I can access it as the root user (sudo -i) but not as user1
I get permission denied when listing or cding into .ssh even though it shows the files
ls: cannot access /home/user1/.ssh/amazon.pem: Permission denied
ls: cannot access /home/user1/.ssh/id_rsa: Permission denied
ls: cannot access /home/user1/.ssh/known_hosts: Permission denied
ls: cannot access /home/user1/.ssh/id_rsa.pub: Permission denied
total 0
-????????? ? ? ? ? ? amazon.pem
-????????? ? ? ? ? ? id_rsa
-????????? ? ? ? ? ? id_rsa.pub
-????????? ? ? ? ? ? known_hosts
Logging in as root and ls gives following results
# ls -l /home/user1/ -a |grep ssh
drw-rw-rw- 2 user1 user1 4096 Aug 27 15:45 .ssh
Even the files inside are .ssh are owned by user1:user1 and chm
-rw-rw-rw- 1 user1 user1 1692 Aug 27 15:45 amazon.pem
-rw-rw-rw- 1 user1 user1 1675 Aug 25 20:01 id_rsa
~/.ssh
directory is700
(drwx------
).