My VM server is installed Ubuntu 12.04 and connected to a storage (not sure about the system of this storage). I have change my home directory to the storage. However this storage could be assessed by a domain group with write permission (I cannot change it).
It could be dangerous if I put my keys where other people can view it. BTW: It seems the authorized_keys cannot be read from my new location ~/.ssh/authorized_keys (I still need to type my password every time). How could I change the ~/.ssh/authorized_keys to another place?
Thanks for any advice. Please let me know if my question is not clear.
12 Answers
If you use an encrypted home directory you will need to change the location.
On the server, edit /etc/ssh/sshd_config to change the location and re-start the ssh server.
See for details
0* sshd_config(5)'s AuthorizedKeysFile now accepts multiple paths, separated by whitespace. The undocumented AuthorizedKeysFile2 option is deprecated (though the default for AuthorizedKeysFile includes .ssh/authorized_keys2)e.g.
AuthorizedKeysFile <path1> <path2> <pathN> 1