1. use SecureCRT to create the private key and public key. secureCRT: QuickConnect-& gt; Authentiation-& gt; PublicKey-& gt; Properties-& gt; CreateIdentityFile-& gt; DSA/RSA-& gt; SetPassphrase-& gt; done generates two files in the specified directory at this time, for example, private key I
1. Use SecureCRT to create the private key and public key.
SecureCRT: Quick Connect-> Authentiation-> Public Key-> Properties-> Create Identity File-> DSA/RSA-> Set Passphrase-> Done
At this time, two files are generated in the specified directory, such as the Private Key Identity and Public Key Identity. pub.
2. Create a new user
# Useradd subsir-m # su subsir // switch to the subsir user. The following operations must be performed using the subsir account, and subsir must have the permission.
3. Create the. ssh folder in the/home/roger directory and change the permission.
# mkdir /home/subsir/.ssh# chmod 700 /home/subsir/.ssh
4. Upload the Public Key Identity. pub to the linux server and convert the public key in the SSH2 compatible format to the Openssh compatible format.
# ssh-keygen -i -f Identity.pub >> /home/subsir/.ssh/authorized_keys# chmod 600 /home/subsir/.ssh/authorized_keys
5. Set the logon mode to PublicKey in SecureCRT, and select the created Identity file as the private key.
6. Restart the SSH server on the Ubuntu server.
#sudo /etc/init.d/ssh restart
7. Because you have set a key to log on, you can remove the original password.
# vi /etc/ssh/sshd_config
# If you want to modify the Port:
# Change port 22 to port number
Protocol 2/Only SSH2 is allowed
PubkeyAuthentication yes/* enable PublicKey Authentication
PasswordAuthentication no/* password verification prohibited Login