Date: 27 Feb 2000 18:01:32 +0100 From: Bjoern Groenvall <bg@sics.se> To: Doug White <dwhite@resnet.uoregon.edu> Cc: Kris Kennaway <kris@FreeBSD.ORG>, Bjoern Groenvall <bg@sics.se>, "Jordan K. Hubbard" <jkh@zippy.cdrom.com>, current@FreeBSD.ORG, markm@FreeBSD.ORG Subject: Re: OpenSSH /etc patch Message-ID: <wud7pi60lv.fsf@bg.sics.se> In-Reply-To: Doug White's message of Sun, 27 Feb 2000 01:05:20 -0800 (PST) References: <Pine.BSF.4.21.0002270102300.63350-100000@resnet.uoregon.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Doug White <dwhite@resnet.uoregon.edu> writes: > On Sat, 26 Feb 2000, Kris Kennaway wrote: > > > On 26 Feb 2000, Bjoern Groenvall wrote: > > > > > Right, the code does not lie (if ssh is setuid root). But, if the host > > > key has not yet been created, then no host can have the public key and > > > thus rsa-rhosts authentication won't work anyways. It is not required > > > to run ssh-keygen to make ssh work, Sshd still requires the host key > > > to operate. > > > > I don't follow you - if no host key is generated, then you can't ever use > > the RSA-rhosts authentication mechanism to log into another server until > > you do. Thus part of ssh's functionality is broken until you generate that > > key, so we do it for you the first time you boot. > > I was under the impression that host keys are exchanged before the > authentication type is selected, so a) the identity of the remote is > compared to known_hosts and reacted to accordingly, and b) the remainder > of the session is encrypted no matter what auth type (so, i.e., the > password is encrypted if RSA keys are not used). The server host key is used as part of the key material negotiation. However, only the *server* host key is used, the client end host key is never used. Just turn of the suid bit from ssh and give it a try (or even mv /etc/ssh_host_key). After the initial handshake it is time for authentication. If RSA-rhost authentication is used then the ssh client uses the private part of the client key. At the server end, the server looks up the public part of the client host key and uses that to verify authenticity. If the server can't find the client public key, then access is denied. So lets assume that the client don't have a host key but that it is created during boot. Then there can be no host that knows the corresponding public key. Now the client tries to use RSA-rhost authentication, when the server attempts to verify authenticity it will fail to lookup the key (remember that it was created on the client perhaps moments ago). For RSA-rhost authentication to work the public keys must first be shipped around among the hosts, only then can RSA-rhost authentication operate. > I'm thinking of the old/stock sshd, not OpenSSH, but I'm not aware of that > big a change. I don't think there has been any radical changes with respect to this. There might be some extra knobs in OpenSSH to control wether the server will accept public keys from $HOME/.ssh/known_hosts files or only from /etc/ssh_known_hosts. /Björn -- _ _ ,_______________. Bjorn Gronvall (Björn Grönvall) /_______________/| Swedish Institute of Computer Science | || PO Box 1263, S-164 29 Kista, Sweden | Schroedingers || Email: bg@sics.se, Phone +46 -8 633 15 25 | Cat |/ Cellular +46 -70 768 06 35, Fax +46 -8 751 72 30 `---------------' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?wud7pi60lv.fsf>