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

mukto6121

Member
Credits
335
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
Credits
24,603
Just generate a keypair without a passphrase.
 

mukto6121

Member
Credits
335
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
Credits
24,603
The only way have every generate a key pair in Windows was with puttygen.
 

f33dm3bits

Gold Member
Gold Supporter
Credits
24,603
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."
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Latest posts

Top