Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: Hostkeys for Interfaces?

Subject: Re: Hostkeys for Interfaces?
Date: Thu, 10 Feb 2005 22:43:55 +0200
Monani, Jignesh Vasantbhai (Jignesh Vasantbhai)** CTR ** wrote:

I thought by default SSH uses rsa host keys irrespective of order of files
in /etc/ssh/sshd_config file. We comment rsa key for sshd to use only dsa
host key. Is there any way to change priority of type of keys ?

- Jignesh
[SNIP]


Please check OpenSSH options
HostKeyAlgorithms
Specifies the protocol version 2 host key algorithms that the
client wants to use in order of preference. The default for this
option is: ``ssh-rsa,ssh-dss''.


===================================================
Let .../sshd_config contain two rsa keys from type "ssh-rsa" and one from type "ssh-dss":
...
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_rsa_key2
HostKey /etc/ssh/ssh_host_dsa_key
...


try to connect with command
 ssh -o HostKeyAlgorithms ssh-rsa ...

Let later to change only order of rsa keys in sshd_config. i.e.:
...
HostKey /etc/ssh/ssh_host_rsa_key2
HostKey /etc/ssh/ssh_host_rsa_key
...
and to repeat test:
 ssh -o HostKeyAlgorithms ssh-rsa ...

The test show that sshd use first listed in sshd_config from type "ssh-rsa".

As example OpenSSH client can request dsa host key with command
 ssh -o HostKeyAlgorithms ssh-dss ...


Regards, Roumen Petrov

--
Get X.509 certificates support in OpenSSH:
http://roumenpetrov.info/openssh/


<Prev in Thread] Current Thread [Next in Thread>