Skip to content

Improve tsh ssh error messages#60099

Merged
rosstimothy merged 1 commit intomasterfrom
tross/tsh_error_messages
Oct 14, 2025
Merged

Improve tsh ssh error messages#60099
rosstimothy merged 1 commit intomasterfrom
tross/tsh_error_messages

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

@rosstimothy rosstimothy commented Oct 9, 2025

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

$ 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

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.

@rosstimothy rosstimothy force-pushed the tross/tsh_error_messages branch 4 times, most recently from 26d895e to cfd5c57 Compare October 9, 2025 20:41
@rosstimothy rosstimothy marked this pull request as ready for review October 9, 2025 21:09
@github-actions github-actions bot requested review from espadolini and gzdunek October 9, 2025 21:10
Comment thread api/client/proxy/client.go Outdated
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 force-pushed the tross/tsh_error_messages branch from 6e3b54a to f90997a Compare October 10, 2025 14:01
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from gzdunek October 12, 2025 18:01
@rosstimothy rosstimothy enabled auto-merge October 14, 2025 12:58
@rosstimothy rosstimothy added this pull request to the merge queue Oct 14, 2025
Merged via the queue into master with commit 348699d Oct 14, 2025
43 checks passed
@rosstimothy rosstimothy deleted the tross/tsh_error_messages branch October 14, 2025 13:21
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@rosstimothy See the table below for backport results.

Branch Result
branch/v17 Failed
branch/v18 Create PR

rosstimothy added a commit that referenced this pull request Oct 14, 2025
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
github-merge-queue bot pushed a commit that referenced this pull request Oct 14, 2025
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
mmcallister pushed a commit that referenced this pull request Nov 6, 2025
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
rhammonds-teleport pushed a commit that referenced this pull request Nov 6, 2025
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
mmcallister pushed a commit that referenced this pull request Nov 19, 2025
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
mmcallister pushed a commit that referenced this pull request Nov 20, 2025
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
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.

Error Message when unable to connect to a resource is confusing to an end user

3 participants