A Brief But Accurate Documentation, BSD Linux And Programming

 Docker

Saturday, August 7, 2021

SSH without password from windows to Ubuntu

 

First generate a key from cmd with the following

ssh-keygen

Then type with this following and change the ssh's user and address with yours

type C:\Users\yourprofile\.ssh\id_rsa.pub | ssh ivan@192.168.88.85 "cat >>.ssh/authorized_keys"

done try to access your workstation directly from cmd it would not ask you to enter a password.

If it failed you can copy it manually:
Head to C:\Users\Your Username\.ssh and open up id_rsa.pub with notepad and copy it
then log in to the Linux over ssh, run the following command:
nano ~/.ssh/authorized_keys then paste it the key that you have previously copied.
Log out from Linux ssh then try to log back again it will no requires password to log in








No comments:

Post a Comment

Back to top