General commands for using OpenSSH

Generating a SSH key allows paswordless login.

After a Key is generated it needs to be transferred to the remote host's authorized_keys file, that can be done with ssh-copy-id command.

Generate a key.

ssh-keygen -t rsa -b 4096

Remove a host from known hosts.

ssh-keygen -R

Copy public key

ssh-copy-id user@

On windows you can install Git SCM for Windows, it provides a BASH emulation which you can use to run ssh-copy-id command. It uses the SSH Key from User's directory generated by SSH on Windows.

Install OpenSSH on Windows


OpenSSH man page