Skip to content

Conversation

rosstimothy
Copy link
Contributor

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.

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
@rosstimothy rosstimothy marked this pull request as ready for review October 14, 2025 15:37
@github-actions github-actions bot requested review from espadolini and zmb3 October 14, 2025 15:37
@rosstimothy rosstimothy added this pull request to the merge queue Oct 14, 2025
Merged via the queue into branch/v18 with commit e50b449 Oct 14, 2025
46 checks passed
@rosstimothy rosstimothy deleted the bot/backport-60099-branch/v18 branch October 14, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants