mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-03 07:40:28 +08:00
* Add `tsh config ssh` helper to generate OpenSSH client configuration This adds a new subcommand, `tsh config ssh`, to generate OpenSSH client configuration snippets that allow users to connect directly to nodes using the standard `ssh` client. To support this change, tsh's `known_hosts` file has been modified to match the format required by OpenSSH when verifying hosts against certificates. Old-style `known_hosts` entries will be automatically replaced and pruned when the end user first logs in with an updated `tsh`. Small changes were additionally made to the keystore and key agent to pass the proxy host into `AddKnownHostKeys` and to support wildcard hostnames in `known_hosts` entries. * Fix broken link to Trusted Clusters documentation * Use text/template for SSH config generation; wrap all errors. * Rename config helper from `config ssh` to just `config` This changes the config helper to use just `tsh config` per suggestion from @r0mant. * Fix known_hosts_migrate_test after rebase * First pass at review feedback * Update docs/pages/server-access/guides/openssh.mdx Co-authored-by: Roman Tkachenko <roman@gravitational.com> * Ensure top-level hostnames never match wildcard patterns * Add additional host count check to `canPruneOldHostsEntry`. * Replace excess call to `isOldStyleHostsEntry` with documented invariant * Trim trailing dots on absolute hostnames in `matchesWildcard` Co-authored-by: Roman Tkachenko <roman@gravitational.com>