Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use a new Windows Terminal app for SSH? [closed]

The Windows Terminal app is advertised as a central hub for all terminal work, so I'm interested in a way to bring my SSH connections into it and replace ancient PuTTY.

like image 646
Himura Avatar asked Aug 05 '19 17:08

Himura


People also ask

Can I use Windows Terminal to SSH?

In this article. Windows has a built-in SSH client that you can use in Windows Terminal.

Can you add PuTTY to Windows Terminal?

Also, see this GitHub issue where they explain that since Putty is actually a complete GUI application it can't run within Windows Terminal.


1 Answers

You can use a commandline field in your profile configuration to initiate an SSH connection on tab creation.

Step-by-step guide:

  1. Ensure you have an SSH client (try to connect to the server from a Command Prompt tab). @dhgouveia2's post details this step.
  2. Open Settings (Ctrl+,)
  3. Find the "list" array in the "profiles" object
  4. Find a Command Prompt profile ("commandline": "cmd.exe")
  5. Duplicate the profile (copy-paste the whole object, watch for the comma between objects)
  6. Change the "guid" value to a new GUID (for example, from here)
  7. Change the commandline value to "commandline" : "ssh me@my-server -p 22 -i ~/.ssh/id_rsa" (use your own connection command).
  8. Change the profile's "name"
  9. Add an "icon" : "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png" item to use a Tux icon (default icons are here)
  10. You should have something like this:
    {     "$schema": "https://aka.ms/terminal-profiles-schema",     "profiles":     {         "list":         [             // ...             {                 "guid": "{1d43c510-93e8-4960-a18b-e432641e0930}",                 "name": "ssh my-server",                 "icon" : "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",                 "commandline": "ssh me@my-server -p 22 -i ~/.ssh/id_rsa"             }         ]     } } 
  11. Save the configuration and enjoy the new item in the New Tab drop-down.
like image 117
Himura Avatar answered Sep 19 '22 09:09

Himura