Skip to content

[vnet] feat: add "Connect with VNet" button to SSH servers#55623

Merged
nklaassen merged 4 commits intomasterfrom
nklaassen/vnet-ssh-connect
Jun 13, 2025
Merged

[vnet] feat: add "Connect with VNet" button to SSH servers#55623
nklaassen merged 4 commits intomasterfrom
nklaassen/vnet-ssh-connect

Conversation

@nklaassen
Copy link
Copy Markdown
Contributor

This commit adds a "Connect with VNet" option to all SSH servers in the unified resource view. It works similar to the existing Connect button on TCP apps, it will start VNet if it is not started, and if it's the first ever start of VNet it will open the VNet info page. The normal/existing Connect username dropdown still works, this just adds a menu next to it with a single option.

Screenshot 2025-06-10 at 6 40 02 PM Screenshot 2025-06-10 at 6 40 08 PM Screenshot 2025-06-10 at 6 40 24 PM

TODO in following PRs:

  • mention SSH in the VNet info page
  • update the VNet panel to mention SSH

Part of RFD 207

@nklaassen nklaassen requested a review from ravicious June 11, 2025 01:42
@nklaassen nklaassen added backport-required no-changelog Indicates that a PR does not require a changelog entry vnet labels Jun 11, 2025
@github-actions github-actions Bot requested a review from gzdunek June 11, 2025 01:43
@nklaassen nklaassen force-pushed the nklaassen/vnet-ssh-connect branch from 21a352a to d75bf67 Compare June 11, 2025 01:55
Copy link
Copy Markdown
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks fine, I'll try to actually use it tomorrow.

rootClusterUri: uri.RootClusterUri;
/**
* Details of the app if the doc was opened by selecting a specific TCP app.
* Details of the resource if the doc was opened by selecting a specific resource.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might make sense to move this JSDoc comment to the definition of VnetLauncherArgs rather than keeping it above the launcherArgs field.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of the comment relates to the state of the DocumentVnetInfo so I opted to keep it and add another JSDoc comment on VnetLauncherArgs

Comment thread web/packages/teleterm/src/ui/Vnet/useVnetLauncher.tsx Outdated
Comment thread web/packages/teleterm/src/ui/Vnet/useVnetLauncher.tsx Outdated
@ravicious ravicious self-requested a review June 12, 2025 16:22
Copy link
Copy Markdown
Contributor

@gzdunek gzdunek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't managed to test this, but the code looks good.

Leaving a preemptive approval so this PR isn't blocked.

Copy link
Copy Markdown
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, there are only those minor issues related to comments to address.

@nklaassen nklaassen force-pushed the nklaassen/vnet-ssh-diag branch from 4a583b3 to 9abc8ad Compare June 13, 2025 16:54
@nklaassen nklaassen force-pushed the nklaassen/vnet-ssh-connect branch from d75bf67 to 70e25c4 Compare June 13, 2025 17:01
@nklaassen nklaassen changed the base branch from nklaassen/vnet-ssh-diag to master June 13, 2025 17:02
@nklaassen nklaassen enabled auto-merge June 13, 2025 17:20
@nklaassen nklaassen added this pull request to the merge queue Jun 13, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 13, 2025
@nklaassen nklaassen added this pull request to the merge queue Jun 13, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 13, 2025
@nklaassen nklaassen added this pull request to the merge queue Jun 13, 2025
Merged via the queue into master with commit 7fd5229 Jun 13, 2025
39 checks passed
@nklaassen nklaassen deleted the nklaassen/vnet-ssh-connect branch June 13, 2025 18:28
nklaassen added a commit that referenced this pull request Jun 13, 2025
nklaassen added a commit that referenced this pull request Jun 13, 2025
github-merge-queue Bot pushed a commit that referenced this pull request Jul 22, 2025
* [v17][vnet] feat: TCP dial to SSH targets

Backport #55087 to branch/v17

* [v17][vnet] feat: accept incoming SSH connections

Backport #55155 to branch/v17

* [v17][vnet] feat: forward SSH connections to target

Backport #55156 to branch/v17

* [v17][vnet] feat: write VNet SSH keys to TELEPORT_HOME

Backport #55228 to branch/v17

* [v17][vnet] feat: write OpenSSH-compatible config file for VNet SSH

Backport #55239 to branch/v17

* [v17][vnet] fix: support <hostname>.<leaf-cluster> for VNet SSH

Backport #55688 to branch/v17

* fix BlockUntil API for backport

* [v17][vnet] feat: add "Connect with VNet" button to SSH servers

Backport #55623 to branch/v17

* [v17][vnet] feat: support VNet SSH when cluster name does not match proxy public addr

Backport #55655 to branch/v17

* [v17][vnet] feat: add SSH configuration diagnostic

Backport #55594 to branch/v17

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>

* [v17][vnet] feat: show SSH status in VNet slider

Backport #55755 to branch/v17

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>

* [v17][vnet] feat: support proxy recording mode with VNet SSH

Backport #55788 to branch/v17

* [v17][vnet] feat: support diag checks on windows

Backport #55856 to branch/v17

* [v17] fix: data race in vnet.TestSSH

Backport #55980 to branch/v17

* [v17][vnet] feat: mention SSH on VNet info page

Backport #55973 to branch/v17

* [v17][vnet] feat: serve DNS on IPv4

Backport #55539 to branch/v17

* [v17][vnet] fix: close proxied channel only after data and requests are complete

Backport #56020 to branch/v17

* [v17][vnet] feat: automatic SSH client configuration

Backport #55923 to branch/v17

* VNet docs: Provide clear instructions for getting debug logs (#56068)

* VNet diag notification: Do not show button to open report if there's no workspace selected (#56067)

* VNet diag report: Don't show button in notification if there's no workspace

* Replace deprecated MutableRefObject with RefObject

* Make openReport not depend on value of rootClusterUri

Otherwise the effect that uses setInterval re-runs whenever the user
switches to another workspace.

* [v17][vnet] feat: automatic SSH client configuration in Connect

Backport #55924 to branch/v17

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
Co-authored-by: Grzegorz Zdunek <grzegorz.zdunek@goteleport.com>

* [v17][vnet] fix: avoid empty host matchers in generated SSH config

Backport #56103 to branch/v17

* avoid t.Context() pre go1.24

* fix cspell lint

* [v17][docs] VNet SSH

Backport #56147 to branch/v17

* [v17][vnet] feat: SSH usage reporting

Backport #56537 to branch/v17

* [v17][vnet] fix: mask default IP route on windows

Backport #56957 to branch/v17

---------

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
Co-authored-by: Grzegorz Zdunek <grzegorz.zdunek@goteleport.com>
github-merge-queue Bot pushed a commit that referenced this pull request Jul 22, 2025
* [v18][vnet] feat: TCP dial to SSH targets

Backport #55087 to branch/v18

* [v18][vnet] feat: accept incoming SSH connections

Backport #55155 to branch/v18

* [v18][vnet] feat: forward SSH connections to target

Backport #55156 to branch/v18

* [v18][vnet] feat: write VNet SSH keys to TELEPORT_HOME

Backport #55228 to branch/v18

* [v18][vnet] feat: write OpenSSH-compatible config file for VNet SSH

Backport #55239 to branch/v18

* [v18][vnet] fix: support <hostname>.<leaf-cluster> for VNet SSH

Backport #55688 to branch/v18

* [v18][vnet] feat: add "Connect with VNet" button to SSH servers

Backport #55623 to branch/v18

* fix test in backport

* [v18][vnet] feat: support VNet SSH when cluster name does not match proxy public addr

Backport #55655 to branch/v18

* [v18][vnet] feat: add SSH configuration diagnostic

Backport #55594 to branch/v18

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>

* [v18][vnet] feat: show SSH status in VNet slider

Backport #55755 to branch/v18

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>

* [v18][vnet] feat: support proxy recording mode with VNet SSH

Backport #55788 to branch/v18

* [v18][vnet] feat: support diag checks on windows

Backport #55856 to branch/v18

* [v18] fix: data race in vnet.TestSSH

Backport #55980 to branch/v18

* [v18][vnet] feat: mention SSH on VNet info page

Backport #55973 to branch/v18

* [v18][vnet] feat: serve DNS on IPv4

Backport #55539 to branch/v18

* [v18][vnet] fix: close proxied channel only after data and requests are complete

Backport #56020 to branch/v18

* [v18][vnet] feat: automatic SSH client configuration

Backport #55923 to branch/v18

* VNet diag notification: Do not show button to open report if there's no workspace selected (#56067)

* VNet diag report: Don't show button in notification if there's no workspace

* Replace deprecated MutableRefObject with RefObject

* Make openReport not depend on value of rootClusterUri

Otherwise the effect that uses setInterval re-runs whenever the user
switches to another workspace.

* [v18][vnet] feat: automatic SSH client configuration in Connect

Backport #55924 to branch/v18

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
Co-authored-by: Grzegorz Zdunek <grzegorz.zdunek@goteleport.com>

* [v18][vnet] fix: avoid empty host matchers in generated SSH config

Backport #56103 to branch/v18

* [v18][docs] VNet SSH

Backport #56147 to branch/v18

* [v18][docs] add VNet warnings

Backport #56601 to branch/v18

* [v18][vnet] feat: SSH usage reporting

Backport #56537 to branch/v18

* [v18][vnet] fix: mask default IP route on windows

Backport #56957 to branch/v18

---------

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
Co-authored-by: Grzegorz Zdunek <grzegorz.zdunek@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry size/sm ui vnet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants