Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My Uni's all ssh keys were stolen. The Sys admins decided to remove all .ssh folders and move the files to a folder which name I cannot say.

I am interested how the sysadmins changed the default SSH-key folder.

How can you change the default ~/.ssh -folder to the folder ~/TopSecret/, such that my computer detects that the keys are in a new folder?

share|improve this question
add comment

3 Answers

up vote 8 down vote accepted

Have a look at sshd_config(5) and edit /etc/ssh/sshd_config. Note that the path of relevant configuration files is set for each file individually (that is, it's not a matter of just changing the string .ssh to something else in one place in the config file).

Anyway, the setting you're looking for is AuthorizedKeysFile.

share|improve this answer
1  
From the openssh sshd_config man pages: AuthorizedKeysFile. Specifies the file that contains the public keys that can be used for user authentication. AuthorizedKeysFile may contain tokens of the form %T which are substituted during connection setup. The following tokens are defined: %% is replaced by a literal '%', %h is replaced by the home directory of the user being authenticated, and %u is replaced by the username of that user. After expansion, AuthorizedKeysFile is taken to be an absolute path or one relative to the user's home directory. The default is ``.ssh/authorized_keys''. –  samt May 25 '09 at 23:20
add comment

To reduce the impact of private key disclosure, it's advisable to password encrypt the key itself. Offline brute force attacks on specific keys are still possible, but it does throw a wrench in someone who makes off with a cartload of user keys.

More to the point, you shouldn't store private keys of value on anything you don't control. To connect to a server, storing the public key on the server is sufficient.

share|improve this answer
add comment

You can rename folders with the "mv" command. So you could rename TopSecret back to .ssh by "mv TopSecret .ssh".

The administrators can control where the sshd looks for your keys by changing the /etc/ssh/sshd_config file's AuthorizedKeysFile parameter. You can't change this.

share|improve this answer
1  
Thank you for your answer! –  Masi May 21 '09 at 22:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.