5

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.

Zanna
  • 70,465
Bangyou
  • 201
  • 1
  • 3
  • 8

2 Answers2

4

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 http://bodhizazen.com/Tutorials/Ecryptfs#SSH for details

Panther
  • 102,067
3

http://www.openssh.com/txt/release-5.9

* 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>
Zanna
  • 70,465
Tom Paine
  • 81
  • 6