Never Type Your Password Again: Automatic SSH Logins in Windows Terminal
Overview
Requirement
Procedures
-
Generate key
-
Execute
ssh-keygen
and generate the fileid_rsa
1C:\Users\dennys>ssh-keygen 2Generating public/private rsa key pair. 3Enter file in which to save the key (C:\Users\dennys/.ssh/id_rsa):
-
The content of id_rsa is like the following.
1ssh-rsa AAAAB******************== dennys@mypc123
-
-
Put the key on Linux
-
Open the file
~/.ssh/authorized_keys
and paste the content of id_rsa into it.
-
Open the file
-
Test automatically login
-
Execute
ssh name@host
, you don't need to input password any more.
-
Execute
-
Configuratino Windows Terminal
-
Open
settings.json
of Windows Terminal.-
Click Windows Terminal -> Settings -> Open JSON file
-
Add a new profile in
settings.json
1 "profiles": 2 { 3 "defaults": {}, 4 "list": 5 [ 6 { 7 "name": "ssh linux100", 8 "commandline": "ssh dennys@192.168.1.100", 9 "tabTitle": "This is a tab title", 10 "hidden": false 11 }, 12 ] 13 }
-
Test the new profile, when you click it, Windows Terminal should open a new tab and login automatically.
-
-