[SOLVED] How to ssh from windows to linux via ssh-key

mukto6121

Member
Joined
Jun 13, 2021
Messages
50
Reaction score
5
Credits
399
I want to ssh to my linux machine from windows by windows command prompt OpenSSH by ssh private key. I don't want to put my SSH password everytime i login to my linux server. I tried some googling but all of them shows how to do it by putty. I'm not expecting any solutions because there is no problem please share a blogpost or steps.
 
Last edited:


f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,353
Reaction score
4,821
Credits
46,704
Just generate a keypair without a passphrase.
 
OP
M

mukto6121

Member
Joined
Jun 13, 2021
Messages
50
Reaction score
5
Credits
399
Looks like i have founded the solution i needed
please read the steps first before following the steps :

1. In windows cmd prompt : "ssh-keygen" (this will generate id_rsa.pub and id_rsa key for windows **REMEMBER TO PRESS ENTER WHEN ASKES YOU PASSWORD IF YOU WANT TO SSH TO SERVER WITHOUT PASSWORD**)

2. In windows cmd prompt : "scp [location of windows id_rsa.pub] [linux_user]@[linux_IP/linux_hostname]:~/.ssh/authorized_keys" (this will copy windows pub key to linux server, the location of windows id_rsa.pub is shown when you gave the cmd ssh-keygen)

 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,353
Reaction score
4,821
Credits
46,704
The only way have every generate a key pair in Windows was with puttygen.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,353
Reaction score
4,821
Credits
46,704
No, its not the only way you can generate in windows command prompt by OpenSSH
I know it's not the only way. I made a typo what I meant to say was: "The only way I have ever generated a key pair in Windows was with puttygen."
 

Members online


Top