Generating SSH keys under windows.


yousaf465

Well-known member
Local time
8:12 PM
Posts
98
OS
Windows 11
1657533613183.png
1657533624205.png

I tried generating ssh keys using the command
Batch:
ssh-keygen

and this was the output

Batch:
C:\Users\admin>ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\admin/.ssh/id_rsa): ssh-wrt
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ssh-wrt.
Your public key has been saved in ssh-wrt.pub.

tried with Ubuntu in WSL2 and same result
1657533740290.png

Batch:
Generating public/private rsa key pair.
Enter file in which to save the key (/home/admin/.ssh/id_rsa): uopenwrt
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in uopenwrt
Your public key has been saved in uopenwrt.pub
The key fingerprint is:
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Dell/XPS 7590
    CPU
    i7-9750H
    Memory
    16GB
    Graphics Card(s)
    GTX 1650
Since you did not specify a full path for ssh-keygen it will save to the current working directory when you executed the command, so the key should be in the root of your user directory
 

My Computer

System One

  • OS
    Windows 11
Since you did not specify a full path for ssh-keygen it will save to the current working directory when you executed the command, so the key should be in the root of your user directory
yes found it,but I should use it for ssh using windows terminal? 1657623108692.png
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Dell/XPS 7590
    CPU
    i7-9750H
    Memory
    16GB
    Graphics Card(s)
    GTX 1650
You can use the public key to connect to the system it was generated from. You would use the public key from the remote system (copy it locally) and call that with -KeyFilePath assuming the remote system is setup for public key authentication
 

My Computer

System One

  • OS
    Windows 11
You can use the public key to connect to the system it was generated from. You would use the public key from the remote system (copy it locally) and call that with -KeyFilePath assuming the remote system is setup for public key authentication
it was generated on this very Windows 11 system.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Dell/XPS 7590
    CPU
    i7-9750H
    Memory
    16GB
    Graphics Card(s)
    GTX 1650
Back
Top Bottom