Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
libssh-mirror
libssh-mirror
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 73
    • Issues 73
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 9
    • Merge requests 9
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libssh project
  • libssh-mirrorlibssh-mirror
  • Issues
  • #68

Closed
Open
Created Mar 30, 2021 by Anderson Sasaki@ansasakiDeveloper

T160: Implement hostkeys-00@openssh.com global request

Description

Originally reported by asn: https://bugs.libssh.org/T160

Implement hostkeys-00@openssh.com 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 "hostkeys-00@openssh.com" and "hostkeys-prove-00@openssh.com"

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          "hostkeys-00@openssh.com"
   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 "hostkeys-prove@openssh.com" message to request the server prove ownership of the private half of the key.

   byte            SSH_MSG_GLOBAL_REQUEST
   string          "hostkeys-prove-00@openssh.com"
   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          "hostkeys-prove-00@openssh.com"
   string          session identifier
   string          hostkey

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

   byte            SSH_MSG_REQUEST_SUCCESS
   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.

Comments:

Jakuje commented on 2020-10-05 07:58:30 UTC:

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.

https://lists.mindrot.org/pipermail/openssh-unix-dev/2020-October/038869.html


To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking