[v18] Improve tsh ssh error messages#60215
Merged
rosstimothy merged 1 commit intobranch/v18from Oct 14, 2025
Merged
Conversation
Fixes #60055 and #53267. Errors emitted when access is denied or hosts are missing from the inventory have been updated to be clearer to end users. The current error when connecting to a host that does not exist ```bash $ tsh ssh tim@fake-host ERROR: failed connecting to host fake-host:0: failed to receive cluster details response failed to dial target host direct dialing to nodes not found in inventory is not supported ``` has been updated to remove ancillary details that have zero meaning to anyone other than a Teleport developer and better clarify the host does not exist. ``` $ tsh ssh tim@fake-host ERROR: failed connecting to host fake-host: target host fake-host is offline or does not exist ``` The access denied error ``` $ tsh ssh tim@server01 uptime ERROR: access denied to tim connecting to server01:0 ``` has had a relatively minor and possibly unnoticed change to omit the port from the dial target. ``` $ tsh ssh tim@server01 uptime ERROR: access denied to tim connecting to server01 ``` fix: use net.SplitHostPort instead of strings.Cut
zmb3
approved these changes
Oct 14, 2025
espadolini
approved these changes
Oct 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #60099 to branch/v18
changelog: Updated error messages displayed by tsh ssh when access to hosts is denied and when attempting to connect to a host that is offline or not enrolled in the cluster.