custom profiles don't scale #10801

Closed
opened 2026-01-31 02:30:40 +00:00 by claunia · 6 comments
Owner

Originally created by @cadayton on GitHub (Sep 27, 2020).

I have hundreds of potential ssh sessions and I don't want to create 100s of custom profiles for each instance. It would helpful if parameterized custom profiles was supported. Also, looking forward to when new-tab can actually open a new tab rather than a new window.

Today, I do the following with ConEMU. Define a PowerShell alias 'ldp' (load putty) that does the following.
putty.exe -new_console -load $hostname

In a ConEMU's powershell console, entering 'ldp $hostname' launches a new tab with the ssh session to the host.

This is the only issue preventing me from dropping ConEMU in favor of Windows Terminal.

Originally created by @cadayton on GitHub (Sep 27, 2020). I have hundreds of potential ssh sessions and I don't want to create 100s of custom profiles for each instance. It would helpful if parameterized custom profiles was supported. Also, looking forward to when new-tab can actually open a new tab rather than a new window. Today, I do the following with ConEMU. Define a PowerShell alias 'ldp' (load putty) that does the following. ```putty.exe -new_console -load $hostname``` In a ConEMU's powershell console, entering 'ldp $hostname' launches a new tab with the ssh session to the host. This is the only issue preventing me from dropping ConEMU in favor of Windows Terminal.
claunia added the Resolution-Duplicate label 2026-01-31 02:30:40 +00:00
Author
Owner

@jack775544 commented on GitHub (Sep 29, 2020):

If you use the ssh command line tool instead of putty you can get something similar. If you create a ssh config file then you can connect by using ssh myServer on the command line. Combine this with the ability to run arbitrary commands in new tabs with the ctrl+shift+p menu by prefixing the command with a > character you can open whatever connection you want just by going ctrl+shift+p and then typing >ssh myServer.

@jack775544 commented on GitHub (Sep 29, 2020): If you use the ssh command line tool instead of putty you can get something similar. If you create a [ssh config file](https://futurestud.io/tutorials/simplify-your-ssh-connections-with-ssh-config-file) then you can connect by using `ssh myServer` on the command line. Combine this with the ability to run arbitrary commands in new tabs with the ctrl+shift+p menu by prefixing the command with a `>` character you can open whatever connection you want just by going `ctrl+shift+p` and then typing `>ssh myServer`.
Author
Owner

@zadjii-msft commented on GitHub (Sep 29, 2020):

Combine this with the ability to run arbitrary commands in new tabs with the ctrl+shift+p menu by prefixing the command with a > character you can open whatever connection you want just by going ctrl+shift+p and then typing >ssh myServer.

Wow I didn't even think about that as a potential use case, but that's a great use of the commandline mode of the command palette. Thanks for sharing!


We've got:

  • Add support for inheriting and overriding another profile's settings #3818
  • Add support for wt.exe to run commands in an existing Terminal Window #4472

If you're okay with it opening a new window, wt ssh $hostname will let you run ssh $hostname in a new WT window, with the default profile.

I bet that #4472 would really be the best way to solve this for you, to be able to just do something like wt -s 0 new-tab ssh $hostname. Does that sound like a good solution to you?

@zadjii-msft commented on GitHub (Sep 29, 2020): > Combine this with the ability to run arbitrary commands in new tabs with the ctrl+shift+p menu by prefixing the command with a `>` character you can open whatever connection you want just by going `ctrl+shift+p` and then typing `>ssh myServer`. Wow I didn't even think about that as a potential use case, but that's a great use of the commandline mode of the command palette. Thanks for sharing! <hr> We've got: * Add support for inheriting and overriding another profile's settings #3818 * Add support for wt.exe to run commands in an existing Terminal Window #4472 If you're okay with it opening a new window, `wt ssh $hostname` will let you run `ssh $hostname` in a new WT window, with the default profile. I bet that #4472 would really be the best way to solve this for you, to be able to just do something like `wt -s 0 new-tab ssh $hostname`. Does that sound like a good solution to you?
Author
Owner

@cadayton commented on GitHub (Sep 30, 2020):

I tried the recommendation of ctrl-shift-p and enter '>ssh '. The ssh config was setup up correctly but the console wasn't able to present the password prompt. When I used the full host domain name all worked as expected. Note the new tab value was just duplicated from the original tab. It would be nice if the new tab could have the hostname.

The #4472 option sounds like potential solution. I see making using of the ssh config would be nice too, but not sure why my config is being ignored for some reason.

Here is a work around, I did but the tab value is always a static 'ssh' when using this work around. In the settings, I defined a profile containing:

"command" : "powershell.exe -NoExit psSSH.ps1"

The PowerShell script simply prompts for the needed info to launch a ssh session.

@cadayton commented on GitHub (Sep 30, 2020): I tried the recommendation of ctrl-shift-p and enter '>ssh <hostname>'. The ssh config was setup up correctly but the console wasn't able to present the password prompt. When I used the full host domain name all worked as expected. Note the new tab value was just duplicated from the original tab. It would be nice if the new tab could have the hostname. The #4472 option sounds like potential solution. I see making using of the ssh config would be nice too, but not sure why my config is being ignored for some reason. Here is a work around, I did but the tab value is always a static 'ssh' when using this work around. In the settings, I defined a profile containing: ```"command" : "powershell.exe -NoExit psSSH.ps1"``` The PowerShell script simply prompts for the needed info to launch a ssh session.
Author
Owner

@cadayton commented on GitHub (Sep 30, 2020):

I locked down the .ssh directory so only my account can access it now. The >ssh method has terminal emulation issues when not using the full host domain name and the target host is RHEL. Can ssh to a Cisco switch using PKI and just the hostname and it works perfectly. I'm sort of favoring my work around because I have the option of customizing the profile attributes. I think that I'll trick up the powershell script to use the ssh config file though.

@cadayton commented on GitHub (Sep 30, 2020): I locked down the .ssh directory so only my account can access it now. The >ssh <hostname> method has terminal emulation issues when not using the full host domain name and the target host is RHEL. Can ssh to a Cisco switch using PKI and just the hostname and it works perfectly. I'm sort of favoring my work around because I have the option of customizing the profile attributes. I think that I'll trick up the powershell script to use the ssh config file though.
Author
Owner

@zadjii-msft commented on GitHub (Oct 1, 2020):

Alright, so I'm gonna close this in favor of #4472. Thanks for following up!

/dup #4472

@zadjii-msft commented on GitHub (Oct 1, 2020): Alright, so I'm gonna close this in favor of #4472. Thanks for following up! /dup #4472
Author
Owner

@ghost commented on GitHub (Oct 1, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Oct 1, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10801