Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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-27-2005, 01:14 PM
|
#1
|
Member
Registered: May 2003
Location: Victoria, CANADA!
Distribution: OpenBSD, Slackware, Debian
Posts: 85
Rep:
|
SSH RSA Auth
Hi,
I don't really understand the concept of ssh key authentication but i have written a custom useradd script that will create the user, make a public/private key for them, add it to authorized_keys for that user, and e-mail them the private key. My question is, how can I make my ssh server only accept keys and not allow "username/password" style logins. Currently, i am making passphrases for my keys, my other question is, if i have a RSA key and a passphrase, would allowing root login then be secure seeing they would have to guess a 1024 bit key and passphrase? So for now, my aim is to have a "RSA key only" authentication on my server. Is this possible, and can anyone point me in the right direction to set it up? So far, the howtos i've read don't make much sense about this specificaly.
Thanks in advance
|
|
|
11-27-2005, 05:42 PM
|
#2
|
Member
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130
Rep:
|
In the ssh_config file (most likely /etc/ssh/ssh_config) try setting the following:
RSAAuthentication yes
PasswordAuthentication no
then restart the sshd process. That should do it. Basically, RSA Key authentication is just that... the server will only allow logins from machines with proper keys. It's just an addedd security measure, which gets a little annoying, if you ask me, but I live on a relatively small network, so the moron factor is cut to a minimum.
As for your second question, it really depends on how many people know the root password I guess. I'm curious if you could even allow root automatic logins by putting the rsa key in "authorized_keys". Sounds like a reall crappy design if you could, but I've never tried. That's the only thing I would be worried about to be honest.
Last edited by GaijinPunch; 11-27-2005 at 05:45 PM.
|
|
|
11-27-2005, 07:42 PM
|
#3
|
Member
Registered: May 2003
Location: Victoria, CANADA!
Distribution: OpenBSD, Slackware, Debian
Posts: 85
Original Poster
Rep:
|
I don't have a large network either, it's just that this sshd is on a live webserver with a few domains, and I am the only one who know root or really needs to ssh in remotely so i figured tight security would be worth the time. Thanks for the reply! I tried what you said earlier and it didn't work, but I just realized that Debian 3.1's sshd uses PAM so i guess that will need to be disabled aswell. Also, you can have an authorized key for root, it is more insecure then "su-ing" once you get in, but my keys do have secure passphrases needed to use it aswell so, it's a thing i'll think about. Again, thanks
|
|
|
All times are GMT -5. The time now is 09:27 PM.
|
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
|
|