LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Configuring SSH to accept only keys (already have keys) (https://www.linuxquestions.org/questions/linux-security-4/configuring-ssh-to-accept-only-keys-already-have-keys-111862/)

fr0st 11-03-2003 11:24 AM

Configuring SSH to accept only keys (already have keys)
 
Hi,

I'm a bit new to securing SSH to do this so I appologise if I may not seam so godly to you guys..

I have a system, Redhat 9 that has openssh installed OpenSSH-3.5p-6 including servers and clients..
I am looking to only enable SSH access via keys. Everyone who will be SSH'ng into this box will already have a public/private keypair and will want to use these.. How can I configure SSH to accept these and not password access?

Your help and efforts are much appreciated.

fr0st

chort 11-03-2003 11:31 AM

First off, UPGRADE YOUR SSH!!! there was a notification on the home page of LinuxQuestions.org for weeks urging everyone to upgrade to 3.7.1p2 because of security flaws in OpenSSH. Go do that IMMEDIATELY.

Next, edit the following lines in /etc/ssh/sshd_config and restart your ssh daemon
PubkeyAuthentication yes
PasswordAuthentication no

If you want only Pubkey and nothing else, you can search through the whole file and turn off any other type of auth. Just make sure you have Protocol 2 because if you turn off RSAAuthentication you will need to use DSA (ssh2-only).

markus1982 11-03-2003 12:04 PM

Quote:

First off, UPGRADE YOUR SSH!!! there was a notification on the home page of LinuxQuestions.org for weeks urging everyone to upgrade to 3.7.1p2 because of security flaws in OpenSSH. Go do that IMMEDIATELY.
You do not neccessarly need to upgrade to 3.7.1p2 since most distribution backport patches to their stable branch so the changes are minimal. Just do the normal way for updating your software. For Debian this would be apt-get update && apt-get upgrade.

fr0st 11-04-2003 03:31 AM

OK
 
Ok,

Thats a fair enough comment... However.. how do I add my key to the system to allow that to be authenticated?

Is it a case of cat key.pub > .ssh/authorized_keys
?


All times are GMT -5. The time now is 11:19 PM.