Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just set up ubuntu server. I want it to act as my git repository for my work. I have installed openssh and have been able to connect by just providing the account password. i.e


which works fine. I have read on some sites that people set up public and private keys in order to secure communication. Not knowing much about ssh, I would like to know: is it necessary for me to do this in order to secure the connection?

share|improve this question
up vote 3 down vote accepted

Is it necessary? No.

Is it a good idea? Probably

Having the key instead of a password means that you're no longer susceptible to brute-force attacks for SSH logins. Requiring both is two-factor auth which is even better.

share|improve this answer
Thanks for the response. I have just created and added my laptops public key to the server. Do I need to add the servers puclic key to my laptop to secure both ways? – geminiCoder Nov 1 '12 at 19:29
@geminiCoder Not unless you plan on SSHing from your server to your laptop. – MDMarra Nov 1 '12 at 19:30

Your Answer


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.