SSH password-free login and principles
Generally, when we connect to a remote server, there are two ways.
1, the user name password, this way when each connection must enter a user name and password, too much trouble, it is not safe.
2, SSH key free password, use ssh to connect to remote server more secure, and do not enter a user name and password, simple number.
This blog mainly on the password-free login and SSH key principles
Generate public and private key Windows system
1, in the Windows system using SSH key Xshell client through the password-free login Linux servers.
Generated key stored in the path you just selected.
Generate public and private key under a Linux system
Execute cd ~/.ssh/
commands, into the .ssh directory.
Files in to view this directory ll
only one file.
Next we use ssh-keygen
to generate public and private key
in a file in to view this directory ll
to generate a public and private key, then explain how to use them free password
Under Windows login password using ssh key free
We need to generate a public key on the Linux server ~ / .ssh / authorized_keys file.
Since there is no authorized_keys files in ~ / .ssh / directory, we first create the file:
Touch authorized_keys
edit authorized_keys -> vim authorized_keys
, and then copy paste the public key into it.
Use Xshell configure ssh key free password