1, install OpenSSH, openssh-server
2. Start Sshd:service sshd start
3, set the boot automatically start Sshd:chkconfig--level
4. Establish private key Public key: Ssh-keygen-t RSA
[[email protected] ~]$ ssh-keygen-t RSA
Generating public/private RSA key pair.
Enter file in which to save the key (/HOME/WSPJING/.SSH/ID_RSA)://press ENTER here directly
Enter passphrase (empty for no passphrase)://Set private key using password, requires 4 characters or more
Enter same Passphrase again:
Your identification has been saved In/home/wspjing/.ssh/id_rsa.
Your public key has been saved in/home/wspjing/.ssh/id_rsa.pub.
The key fingerprint is:
fa:a2:fe:4e:8b:ab:dc:cb:73:ab:6f:42:a7:4a:94:52 [email protected]
The key ' s Randomart image is:
+--[RSA 2048]----+
| |
| |
| E |
| . . |
|. o S |
| O. .. |
| .. oo |
| o O+o+o |
| ++x&*o. |
+-----------------+
5. Setting the public key
[email protected] ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[Email protected] ~]$ rm-f ~/.ssh/id_rsa.pub
6. Download the private key Id_rsa to the Windows system.
7, with Puttygen conversion id_rsa, "load"--"All Files"--find "id_rsa" file, open, enter the above password, will prompt "successfully imported ...", "OK"--" Save private key, the other options in this procedure are the default.
8, open Putty software, left "Connection"--"Data", the right "Auto-login username" after entering the corresponding user name of the private key; left "Connection"--"SSH"--"Auth", right "Browse . ", locate the private key file, the file with the extension" PPK ", the Left" Session ", the right host name under the server IP address," Save Sessions "Enter the shortcut name to save, such as" Auto ", then click" Save ".
9. Click "Open" to prompt
Using username "username".
Authenticating with public key "Imported-openssh-key"
Passphrase for Key "Imported-openssh-key":
Enter the password you set above
SSH private Key Login Putty Chapter