The first step is to generate a public/private key pair
Using the SECURECRT tool-> create the public key, the cryptographic algorithm chooses RSA because the RSA algorithm is selected in the sshd configuration file
This step generates two files, the default is identity and Identity.pub, where identity is the key and Identity.pub is the public key. The next pass phrase can not be entered, do not enter the word when landing does not need to enter a pass phrase. If entered, you will be asked to enter a pass phrase when you log in.
The second step is to upload a Windows client SECURECRT generated public key identity.pub to the user directory. SSH folder. Be sure to upload in ASCII format before uploading.
In the user host directory
mkdir. SSH #在需要开启ssh连接的用户目录下建立. SSH directory
chmod 755. SSH
Ssh-keygen-i-F. Ssh/identity.pub>>.ssh/authorized_keys
chmod 644. Ssh/authorized_keys
Third Step
Vim/etc/ssh/sshd_config #修改ssh配置文件
(1) Protocol2 #仅允许使用SSH2
(2) Port22 #使用22端口
(3) Permitrootloginyes #允许root登录
(2) Pubkeyauthenticationyes #启用公告密钥配对认证方式
(3) Authorizedkeysfile.ssh/authorized_keys
(4) Rsaauthenticationyes #允许RSA密钥
(4) Passwordauthenticationno #禁止密码验证登录, if enabled, OpenSSH RSA authentication login is meaningless.
The third step, reload the sshd service, use/etc/init.d/ssh restart can
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/