Using windows 10 to ssh into a server without needing a password

Prerequisites:

-Server with open ssh enabled

1. On windows open the terminal and use the command (cd .ssh) to open the ssh file directory, then the command (dir) to check to see if you have and ssh key files. (RSA, ECDSA, or ED25519)

2. using the command (cd ..)  to return to the regular command line, use the command (ssh-keygen -t ecdsa -b 521) to generate the key to use to ssh. Press enter to skip file location and passphrase as those are not needed to configure for this

3. Using the same commands from step one (cd .ssh) and (dir), check to make sure new files have been added to your ssh file folder named id_ecdsa and id_ecdsa.pub. In that same folder, use the command (scp id_ecdsa.pub user@serverip:~/) and enter the password for your server.

4. ssh into your server normally using the command (ssh user@serverip). Use the (ls) command to check to make sure the id_ecdsa.pub file is in the directory.

5. Use the command (cat id_ecdsa.pub >> .ssh/authorized_keys) to move the key file into the authorized key folder.

6. Then use the command (chmod 600 .ssh/authorized_keys) to make sure the folder the key is in has permissions. You can check if everything is correct by using the (ls -l .ssh) command

7. Type (exit) to disconnect from the ssh, and use (cd ..) and (cls) to clear back to main terminal.

8. Using the up arrow, navigate back to the (ssh user@serverip) command and press enter and you should log in with no password.

References : Windows 10 Native SSH Client Connect Without Password