I didn't care much about using SSH before. After the installation is not how to configure. Login is also directly with the password. This is not too safe, in fact, it is more troublesome, because each time you have to enter a password. If the public key of the private key is used to authenticate. You can log in directly (provided that the private key is generated without a password) the following sections are modified from the online article
System: FreeBSD 7.1 Release
Tool: Putty
————————————
First step: Generate key
Run Puttygen.exe and select the required key type and length. freebsd7.1 openssh sshd default to use SSH2 (line 20:protocol 2, note that many online tutorials are said Ssh1)
Protocol, so we choose SSH2 (RSA), the length is set to 1024 can be.
After generating the key password and Confirm password two items can be kept empty
This thing is used to protect the private key password, if there is no particularly high security requirements, it is not necessary,
Lest you enter the password once when you log in.
Click the Save private Key button to save the private key (here we do not save the public key, when uploading, directly from the build box copy) such as BLVMING.PPK
Step two: Upload the key
Log in to the remote system with your own account, and then execute the following command:
CD ~
mkdir. SSH
CD. SSH
Cat > Authorized_keys
Note: To copy directly from the Puttygen.exe generated public key generation box if copied from the file. This problem is prone to:
Server refused our key.
Select everything, press CTRL + C to copy to the Clipboard, and then press Shift+ins paste in the Putty window, and then press Ctrl+d to finish creating the file
Step Three: Set putty
Start putty, set the parameters of the session, then select "Ssh-> Authentication" from the left, click the Browse button and select the Blvming.ppk file. Then select the session from the left and click the Save button to save the changes. Then click on the Open button to log in. If there is no problem with the above operation, then it should be automatically logged in, no need to enter a password.
In addition, if the Deny key is still present, you can set the Authorized_keys permission to 644 that is: chmod 644. Ssh/authorized_keys
=================================================
If you want to use the SSH2 protocol, you need to modify the/etc/ssh/ssh_config file, join: Protocol 2,1
If there is no puttygen.exe, then you can use the Bsd/linux Ssh-keygen generated key, the command format is as follows: Ssh-keygen-b key length-t key type key type can be: RSA1 (corresponding to SSH1 RSA), RSA and DSA (corresponds to SSH2)
However, the Ssh-keygen generated SSH2 key and the Putty key format are different, can not be used directly,
Must be converted with Puttygen.exe. So everyone still use rsa1 good, anyway general use
There is no difference.
Putty SSH Key Configuration note