In order to use your public key you must transfer the public-key file (typically Identity.pub) created by the Key Generation wizard to the ~/.ssh directory on the SSH2 The second version of the SSH protocol which provides a way to encrypt network traffic between a client and a server, with a slightly different set of security features than the SSH1 protocol provides. server A computer program that provides services to other computer programs (called clients). Often the computer on which a server program runs is also called a server. The term host is often used as a synonym for server.. It is recommended that you follow the procedure below for using copy and paste to create a copy of the Identity.pub file in the ~/.ssh directory on the remote machine. If you decide instead to transfer the Identity.pub file to the ~/.ssh directory using an FTP client A computer or application that uses services provided by a server., be sure to transfer the file in ASCII mode. Also be sure to complete step 4d below.
To use copy and paste to configure the SSH2 server to recognize your public-key file:
1. Log on to the remote SSH2 server using SSH2 and password authentication The process of verifying that an individual truly is who he or she claims to be. Supplying a password is a very common method of authentication. The most secure method of authentication supported in SecureCRT is public-key authentication. See also: identity file, public-private key pair..
2. On the local machine, use Notepad.exe to open the Identity.pub file that was created with the Key Generation wizard.
3. With the Identity.pub file opened in the Notepad application, open the Edit menu and choose Select All. Once everything is selected, open the Edit menu again and select Copy.
4. On the remote machine, complete the following steps:
a. % cat > ~/.ssh/identity.pub
b. Click on the SecureCRT paste button to paste the contents of the Clipboard (which should now contain the contents of your Identity.pub file).
c. Issue a CTRL+D to close the Identity.pub file.
d. Convert the key to one that OpenSSH will recognize using the following command:
e. Ensure that you are the only user with permissions to write to your "authorized_keys" file. This can be done using the following command:
% chmod 600 ~/.ssh/authorized_keys
The method described above uses only a single public key in the authorization file. It is possible to have more than one public key in the "authorized_keys" file. To add additional public keys, repeat steps 2 through 4.
包子朋友,我想继续请教个问题,那就是如何让SERVER端只允许SSH以RSA认证方式登录呢?我看了一些资料说是vi /etc/ssh/sshd_config设置PasswordAuthentication no 就可以了。我试了下好像没有用,我又修改了ssh_config文件中的 PasswordAuthentication no 项,可还是没有用,当然修改万后我是重启了ssh服务 /etc/init.d/ssh restart,请问我改怎么做呢?现谢谢啦~~