Feature Request: Implement Putty & Git Bash #2690

Closed
opened 2026-01-30 23:02:22 +00:00 by claunia · 7 comments
Owner

Originally created by @nhalstead on GitHub (Jul 10, 2019).

Summary of the new feature/enhancement

I love the style, tabbed windows for the many terminals, but it is missing a few environments like using PuTTY and Git Bash, I have tried to add in Git-Bash but when it gets called it opens a new window, not tab, could be how I have it setup but Im sure you guys would be able to determine it better than I would taking into consideration that you have build a conhost interface for cmd....

Proposed technical implementation details (optional)

Originally created by @nhalstead on GitHub (Jul 10, 2019). # Summary of the new feature/enhancement I love the style, tabbed windows for the many terminals, but it is missing a few environments like using `PuTTY` and `Git Bash`, I have tried to add in Git-Bash but when it gets called it opens a new window, not tab, could be how I have it setup but Im sure you guys would be able to determine it better than I would taking into consideration that you have build a conhost interface for cmd.... # Proposed technical implementation details (optional)
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-30 23:02:22 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 10, 2019):

Putty is a graphical application. It can’t run inside a text terminal. If you’re looking for the more generic concept of an “SSH client,” Windows comes with one called ssh which DOES work in Windows Terminal.

Git Bash is using “mintty,” which is another graphical application. You should provide the path to the real bash.exe; once you do that it’ll work in Windows Terminal. 😄

@DHowett-MSFT commented on GitHub (Jul 10, 2019): Putty is a graphical application. It can’t run _inside_ a text terminal. If you’re looking for the more generic concept of an “SSH client,” Windows comes with one called `ssh` which DOES work in Windows Terminal. Git Bash is using “mintty,” which is _another graphical application_. You should provide the path to the real bash.exe; once you do that it’ll work in Windows Terminal. :smile:
Author
Owner

@nhalstead commented on GitHub (Jul 11, 2019):

Thanks for the reply, Good to know, I dug into how the git bash terminal was called for execution and found all of the related files to launching the window, I was able to add it to the json file and use it with no issues.

As far as the ssh being added in I was talking about actually having it so the window is apart of the terminal and the prompt would allow you open any of the protocols that are supported, almost the same way MPManager (which uses the native PuTTY exe to operate) does it.

@nhalstead commented on GitHub (Jul 11, 2019): Thanks for the reply, Good to know, I dug into how the git bash terminal was called for execution and found all of the related files to launching the window, I was able to add it to the json file and use it with no issues. As far as the `ssh` being added in I was talking about actually having it so the window is apart of the terminal and the prompt would allow you open any of the protocols that are supported, almost the same way [MPManager](https://sourceforge.net/projects/multiputtymanager/) (which uses the native PuTTY exe to operate) does it.
Author
Owner

@heyJonBray commented on GitHub (Sep 3, 2020):

Opening Git Bash in Windows Terminal

Add the following to your settings.json file.

Change starting directory to desired directory, I have mine set to go to where my repos are stored. Also, provide a unique GUID.

{
          // Git Bash profile
          "guid": "{7c449cf0-3oa0-4bee-8c73-0023c09713e7}",
          "commandline": "%PROGRAMFILES%/git/usr/bin/bash.exe -i -l",
          "icon": "%PROGRAMFILES%/Git/mingw64/share/git/git-for-windows.ico",
          "name" : "Git Bash 2.23",
          "startingDirectory": "D:/repos",
          "historySize": 10000
        }

Opening PuTTY in Windows Terminal

This still opens in a new window, working on getting it to open within the Windows Terminal as a new tab. Any feedback appreciated.

Using the -load <SessionName> is a great little argument that prevents authentication problems in both PuTTY and file transfers using pscp as it pulls the keys, etc directly from the saved PuTTY session.

        {
          // Ubuntu Desktop SSH
          "guid": "{7dd9c383-1cf1-444a-aa23-397c36c6e373}",
          "commandline": "putty -load drmanhattan@local osterman@192.168.0.112",
          "name" : "Ubuntu SSH : Osterman",
          "startingDirectory": "",
          "historySize": 10000,
          "fontFace": "Anka/Coder",
          "closeOnExit": true
        },
@heyJonBray commented on GitHub (Sep 3, 2020): ## Opening Git Bash in Windows Terminal Add the following to your `settings.json` file. Change starting directory to desired directory, I have mine set to go to where my repos are stored. Also, provide a unique GUID. ``` { // Git Bash profile "guid": "{7c449cf0-3oa0-4bee-8c73-0023c09713e7}", "commandline": "%PROGRAMFILES%/git/usr/bin/bash.exe -i -l", "icon": "%PROGRAMFILES%/Git/mingw64/share/git/git-for-windows.ico", "name" : "Git Bash 2.23", "startingDirectory": "D:/repos", "historySize": 10000 } ``` ## Opening PuTTY in Windows Terminal > ❗ This still opens in a new window, working on getting it to open within the Windows Terminal as a new tab. Any feedback appreciated. Using the `-load <SessionName>` is a great little argument that prevents authentication problems in both PuTTY and file transfers using `pscp` as it pulls the keys, etc directly from the saved PuTTY session. ``` { // Ubuntu Desktop SSH "guid": "{7dd9c383-1cf1-444a-aa23-397c36c6e373}", "commandline": "putty -load drmanhattan@local osterman@192.168.0.112", "name" : "Ubuntu SSH : Osterman", "startingDirectory": "", "historySize": 10000, "fontFace": "Anka/Coder", "closeOnExit": true }, ```
Author
Owner

@DHowett commented on GitHub (Sep 3, 2020):

This still opens in a new window, working on getting it to open within the Windows Terminal as a new tab. Any feedback appreciated.

putty is a totally separate terminal emulator that is also a graphical application

Why not just use the version of ssh that comes with windows?

"commandline": "ssh osterman@192.168...",
@DHowett commented on GitHub (Sep 3, 2020): > ❗ This still opens in a new window, working on getting it to open within the Windows Terminal as a new tab. Any feedback appreciated. putty is _a totally separate terminal emulator_ that is also a graphical application Why not just use the version of ssh that comes with windows? ``` "commandline": "ssh osterman@192.168...", ```
Author
Owner

@heyJonBray commented on GitHub (Sep 4, 2020):

I gave that a try, passing the key in, but Windows Terminal says that the key does not meet permission requirements. Key was created using PuTTYGen I'm pretty sure, will generate a new keypair using built in ssh and see if that works.

The reason I focused on PuTTY is that I have it hooked up to several different automation tools already and want to minimize the amount of tools I use (particularly when it comes to various custom scripts).

@heyJonBray commented on GitHub (Sep 4, 2020): I gave that a try, passing the key in, but Windows Terminal says that the key does not meet permission requirements. Key was created using PuTTYGen I'm pretty sure, will generate a new keypair using built in `ssh` and see if that works. The reason I focused on PuTTY is that I have it hooked up to several different automation tools already and want to minimize the amount of tools I use (particularly when it comes to various custom scripts).
Author
Owner

@dthompson085 commented on GitHub (Dec 3, 2020):

'Windows Terminal' doesn't say the key doesn't meet permission requirements, that's the program you are running, namely \windows\system32\openssh\ssh.exe . See https://superuser.com/questions/1296024/windows-ssh-permissions-for-private-key-are-too-open and https://superuser.com/questions/1309447/how-to-secure-ssh-private-key-on-windows-10 .

However, if you like putty, it has an auxiliary program plink[.exe] which (like the OpenSSH ssh[.exe]) only does the secure connection and does NOT provide its own terminal GUI, and thus can run in Windows Terminal. It uses putty-style key files and/or the putty agent process pageant, and uses the putty-style known hosts list in the registry not a file, and can use putty-style session profiles, etc.

@dthompson085 commented on GitHub (Dec 3, 2020): 'Windows Terminal' doesn't say the key doesn't meet permission requirements, that's the _program_ you are running, namely \windows\system32\openssh\ssh.exe . See https://superuser.com/questions/1296024/windows-ssh-permissions-for-private-key-are-too-open and https://superuser.com/questions/1309447/how-to-secure-ssh-private-key-on-windows-10 . However, if you like putty, it has an auxiliary program [`plink[.exe]`](https://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink) which (like the OpenSSH `ssh[.exe]`) only does the secure connection and does NOT provide its own terminal GUI, and thus can run in Windows Terminal. It uses putty-style key files and/or the putty agent process `pageant`, and uses the putty-style known hosts list in the registry not a file, and can use putty-style session profiles, etc.
Author
Owner

@basvandenbrink commented on GitHub (Jan 6, 2021):

@dthompson085 Thank for the hint of using plink. However, plink does not include a terminal emulator and hence, it does not support things like using arrow keys to navigate in the history.

As the page you linked to already mentioned:

Plink is probably not what you want if you want to run an interactive session in a console window.

@basvandenbrink commented on GitHub (Jan 6, 2021): @dthompson085 Thank for the hint of using `plink`. However, `plink` does not include a terminal emulator and hence, it does not support things like using arrow keys to navigate in the history. As the page you linked to already mentioned: > Plink is probably not what you want if you want to run an interactive session in a console window.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2690