Tag Archives: Windows Terminal Howto

Windows Terminal is a multi-tabbed terminal emulator available from Microsoft for Windows 10 and 11. Command line applications are executable in a separate tab as PowerShell, WSL, SSH, and Azure Cloud Shell Connector are preconfigured.

Install PowerToys Utilities to customize Windows

PowerToys from Microsoft, when you install, you will find a versatile set of additional tweeks. It is a set of utilities for power users to tune and customize Windows for greater experience of productivity.

Install PowerToys executables via GitHub

Get PowerToys from Github select the PowerToysSetup-0.##.#-x64.exe or PowerToysSetup-0.##.#-arm64.exe file to download the PowerToys executable installer.

Alternatively, get PowerToys from the Microsoft Store. You must be using the new Microsoft Store which will be available for both Windows 11 and Windows 10 v2004 (19041) or newer.

To install PowerToys using the Windows Package Manager, it is as simple as running the following command from the command line / PowerShell:

winget install Microsoft.PowerToys --source winget

PowerToys File Explorer add-ons utility

The highlights are the File Explorer add-ons utility. With the ability of Thumbnail preview showing thumbnails is a built-in Windows feature.

Install PowerToys, Windows Explorer thumbnail preview

For thumbnail preview, PowerToys adds multiple extensions: SVG, PDF, PHP, Shell-Scripts, Java, CSS, Python-code and more.

How to customize Windows File Explorer

To preview files for php, ps1, py, css, vbs, shell scripts and more in File Explorer with just expanding the registry then add this keys.

REG ADD "HKCR\.sh" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.sh" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.sh" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.sh\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f

REG ADD "HKCR\.php" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.php" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.php" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.php\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f

REG ADD "HKCR\.py" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.py" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.py" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.py\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f

REG ADD "HKCR\.ps1" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.ps1" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.ps1" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.ps1\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f

REG ADD "HKCR\.css" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.css" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.css" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.css\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f

REG ADD "HKCR\.vbs" /v "PerceivedType" /t REG_SZ /d "text" /f
REG ADD "HKCR\.vbs" /ve /t REG_SZ /d "txtfile" /f
REG ADD "HKCR\.vbs" /v "Content Type" /t REG_SZ /d "text/plain" /f
REG ADD "HKCR\.vbs\PersistentHandler" /ve /t REG_SZ /d "{5e941d80-bf96-11cd-b579-08002b30bfeb}" /f

What is PowerToys

Microsoft PowerToys is a set of freeware system utilities designed for power users. Developed by Microsoft for use on the Windows operating system. These programs add or change features to maximize productivity or add more customization. PowerToys are available for Windows 95, Windows XP, Windows 10 and Windows 11. The PowerToys for Windows 10 and Windows 11 are free and open-source software licensed under the MIT License and hosted on GitHub.

Windows Terminal SSH connection from KeePass

This tutorial shows how to deploy and use SSH from the Windows Terminal on Windows 11, using the KeePass Password Manager.

Add KeePass URL Override Scheme

In the first step with launch KeePass, a schema element for URL Override is created in KeePass, go to Tools – Options.

SSH Windows KeePass Click Tools Options

Click the Integration tab, then the URL Overrides button at the bottom.

SSH Windows KeePass Options Integration

In the URL Override window, click Add to enter a new schema.

KeePass URL Overrides for Windows Terminal using SSH

As a scheme name I use “winterm” here. Under URL override, insert the following line.

cmd://wt ssh "{USERNAME}@{TITLE}"

  run “wt” to start the windows terminal emulator, then append the user name in brace and the hostname from the title field.

Confirm with OK and close KeePass and start again.

KeePass Add Entry for SSH in Windows Terminal

After our schema element winterm is created, we create a new entry with choose Add Entry, enter the hostname in Title, enter User name and Password, in the field URL insert “winterm:” append with colon.

SSH Windows KeePass Add Entry

Start Windows Terminal SSH session

KeePass double-click the URL item

The saved entry is now available, with a double click on URL the SSH connection is started here to the Linuxmint.

SSH from Windows Terminal on Windows 11 using KeePass

Windows Terminal connect SSH launch from KeePass

Public key authentication

SSH authentication using public key in Windows Terminal launch from KeePass is not only more secure, logging in without entering a password is also easier. For this purpose, a key pair is generated on the client, the public part of the key is transferred to the server, then the server is set up for asymmetric encryption and authentication, more on this in the tutorial here or find on ssh-keygen how it works.

Under the path of the Windows user profile, create a directory “.ssh”, with dot (.), the easiest way to change to the path is to enter “%USERPROFILE%” in the Windows Explorer address bar.

Windows Explorer Address Bar User Profiles

The directory for e.g. c:\users\james\.ssh, which contains the file with the private key “key-ecdsa“, as well as the file “config“.

.ssh folder under the user profile

  The known_hosts file is automatically generated by SSH as soon as a connection has been successfully authenticated for the first time. SSH add fingerprints to known_hosts to avoid Man-in-the-middle attacks.

We create the “config” file using the Notepad Editor, paste in the following lines.

Host linuxmint
     HostName 10.10.10.10
     User james
     IdentityFile ~/.ssh/key-ecdsa
     ServerAliveInterval 60

The host name is that one we use in KeePass at Title, the user i.e. james, the key file refers with IdentityFile to the file “key-ecdsa” under %USERPROFILE%.ssh.

SSH Windows keepass, create the "config" file using the Notepad

  OpenSSH on Windows is a port from the OpenBSD-project (open source), on unixoid operating systems the tilde (~) character is used as a relative path to the user home directory, known on Windows as the environment variable %USERPROFILE%. A leading point in file names and directories (.ssh) applies to hidden files and directories on unixoid systems.