Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-17-2006, 11:12 PM
|
#1
|
Member
Registered: Feb 2002
Location: USA
Distribution: Fedora, CENTOS
Posts: 209
Rep:
|
SSH allow public keys only
Hello.
Is there a way to configure the SSH deamon to _only_ accept connetions via public keys? Meaning that if someone tries to SSH into a linux box and their computer doesn't have a valid key then they won't even get a login prompt?
I've not had any luck searching the forums for this one, and the sshd_config man page hasn't helped.
Thanks.
|
|
|
11-17-2006, 11:18 PM
|
#2
|
Member
Registered: May 2004
Posts: 552
Rep:
|
This is from man sshd_config
PasswordAuthentication
Specifies whether password authentication is allowed. The default is "yes".
|
|
|
11-18-2006, 08:25 AM
|
#3
|
Member
Registered: May 2005
Posts: 36
Rep:
|
well, i think what you need is SSH with Protocol 2...
|
|
|
11-18-2006, 01:18 PM
|
#4
|
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
|
You need at least:
Code:
PasswordAuthentication no
UsePAM no
and possibly
Code:
ChallengeResponseAuthentication no
Your PAM configuration might allow password authentication even if you have it turned off with PasswordAuthentication no.
PS you should always turn off SSHv1:
|
|
|
11-18-2006, 03:34 PM
|
#5
|
Member
Registered: Feb 2002
Location: USA
Distribution: Fedora, CENTOS
Posts: 209
Original Poster
Rep:
|
Thanks chort. Your suggestions worked!
Now only users with a key are allowed to get in.
Thanks!
|
|
|
All times are GMT -5. The time now is 10:33 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|