Skip to content

support Multiplexing of ssh #424

Open
@gzm55

Description

@gzm55

What would you like to be added

The default ssh config template requires execute proxycommand for every connection, for detecting login and bastion, this seems cannot integrate ssh Multiplexing feature to improve handshaking. It should be better to integrate the Multiplexing features with smallstep ssh.

Why this is needed

improve handshaking performance

proposal

  • move the auto-login feature into Match exec config keys and if the check-host successes, do login immediately
  • normally we do not inject the proxycommand, and should set ControlMaster and ControlPath to enable Multiplexing
  • add an special command to check existence of the bastion host, if so, inject dynamic bastion host via proxycommand
  • add local cache as much as possible for results of the ca api queries.

The result of the ssh config would be like this:

Match exec "step ssh check-host-and-login %h ..."
   # for all valid hosts including bastion host
   User=
   UserKnownHostsFile=
   StrictHostKeyChecking=
   ControlMaster=
   ControlPath=
Match exec "step ssh check-host-need-bastion %h %u ..."
  # for only valid hosts behind the bastion
  ProxyCommane=

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions