How to set up a custom SSH configuration in Windows Terminal

 237 total views


2021-03-29 09:52:45

Windows Terminal is main command line experience to run Command Prompt, PowerShell, as well as Linux above Windows 10. Can say This is an application not to be missed for those who own and exploit the full potential of Windows 10.

One of the features that makes great’s Windows Terminal is the ability Custom SSH configuration settings, available as a drop-down menu. This allows you to access your servers extremely quickly when needed, without having to enter the hostname manually, which takes a lot of time.

Prerequisites

To use this setup feature, you’ll first need to be using the latest version of Windows Terminal. If you don’t already have the app on your device, you can download it from the Windows Store.

Besides, you will also need to install WSL – which will be launched when you execute bash.exe. By default, your default WSL distribution will be used.

Customize your configuration

First, launch the Windows Terminal app. Then, click on “Settings” from the drop-down menu.

The installation settings are really just a JSON file that you will have to edit. You can view this schema online, but there will also be some default configurations that you can add.

JSON file

Add the following configuration:

{
      "name" : "SERVER NAME",
      "commandline" : "bash.exe -c "ssh [email protected] "",
      "guid" : "{1d43c510-93e8-bbbb-a18b-e432641e0942}",
      "icon" : "C:UsersAnthonyPicturesexample.png",

      "closeOnExit" : true,
      "colorScheme" : "Campbell",
      "cursorColor" : "#FFFFFF",
      "cursorShape" : "bar",
      "fontFace" : "RobotoMono Nerd Font",
      "fontSize" : 10,
      "historySize" : 9001,
      "snapOnInput" : true,
      "startingDirectory" : ""
},

Note that you will need to change the display name, host name and user of the server, as well as the GUID. You can optionally specify an icon (logo) for the server. This icon can be obtained from the hard drive on the system.

The rest of the configuration will be just the presets. However, you are completely free to customize the font face and other options if you want.

Save the configuration with Control + S and you will see it updated the next time you use the drop-down menu, as shown below:

New configuration

Clicking on any of these will execute a command that automatically opens bash and SSH to the specified server.

.

#set #custom #SSH #configuration #Windows #Terminal

Related Posts

Leave a Reply

Your email address will not be published.

Close Bitnami banner
Bitnami