Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm setting up a server for backing up my desktop box remotely. I want to prevent remote password access to the server, permitting only users with private keys (AKA my desktop box) to access it. How can I block remote password access while allowing physical password access to the server?

share|improve this question

2 Answers 2

up vote 21 down vote accepted

Just insert the following to the sshd config on the server (/etc/ssh/sshd_config)

PasswordAuthentication no

That should do the trick ;)

For more options type man sshd_config in to your terminal.

share|improve this answer
    
See this thread for more hints: ubuntu.stackexchange.com/questions/2271/… –  Source Lab Aug 15 '10 at 21:51

Just a note about SSH access to servers - you may also want to disable the root user from ssh - http://www.howtogeek.com/howto/linux/security-tip-disable-root-ssh-login-on-linux/ - this way at least hackers will have to guess the username as well.

PermitRootLogin no
share|improve this answer
    
+1 for sane advice! Never login as root!! –  jathanism Aug 11 '10 at 23:54

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.