Page MenuHomePhabricator

Implement global request
Open, WishlistPublic


Implement global request.
It is an extension implemented by OpenSSH to allow clients to synchronize the host keys the server is currently using after successful authentication.

Follows below the specification:

connection: hostkey update and rotation ""
and ""

OpenSSH supports a protocol extension allowing a server to inform
a client of all its protocol v.2 host keys after user-authentication
has completed.

byte            SSH_MSG_GLOBAL_REQUEST
string          ""
string[]        hostkeys

Upon receiving this message, a client should check which of the
supplied host keys are present in known_hosts.

Note that the server may send key types that the client does not
support. The client should disregard such keys if they are received.

If the client identifies any keys that are not present for the host,
it should send a "" message to request the
server prove ownership of the private half of the key.

byte            SSH_MSG_GLOBAL_REQUEST
string          ""
char            1 /* want-reply */
string[]        hostkeys

When a server receives this message, it should generate a signature
using each requested key over the following:

string          ""
string          session identifier
string          hostkey

These signatures should be included in the reply, in the order matching
the hostkeys in the request:

string[]        signatures

When the client receives this reply (and not a failure), it should
validate the signatures and may update its known_hosts file, adding keys
that it has not seen before and deleting keys for the server host that
are no longer offered.

These extensions let a client learn key types that it had not previously
encountered, thereby allowing it to potentially upgrade from weaker
key algorithms to better ones. It also supports graceful key rotation:
a server may offer multiple keys of the same type for a period (to
give clients an opportunity to learn them using this extension) before
removing the deprecated key from those offered.

Event Timeline

asn triaged this task as Wishlist priority.Jul 12 2019, 1:00 PM
asn created this task.

FYI, this is now enabled by default in OpenSSH's HEAD, which will probably make it in release in ~6 months. This would make it very useful for libssh to support now.