Found 0 result in total
Content is empty
If you don't find the content you expect, please try another search term
Last updated:2020-06-11 15:16:20
Click the tool in the Xshell menu bar, select "New User Key Wizard", and execute the key pair generation operation.
Note: Set the key type to RSA and the key length to 2048, and then click Next.
Wait until the key is generated successfully, and then select Next. In the following window that appears, fill in the key name and the password for key verification.
Click Next to save the public key (the public key will be uploaded to the KEC instance).
The following figure shows the private key, which is used to log in to the KEC instance subsequently. The private key can be exported and saved.
Now the key is generated.
Click OK and then click Connect.
The CentOS user name is root.
Enter the password to complete the connection. Run the rz command (if there is no rz command, run yum install lrzsz and then enter y twice to confirm). After uploading the key file to the KEC instance, perform the following operations to add kectest.pub to /root/.ssh/.
ls -a
mkdir .ssh
chmod 700 .ssh/
cd .ssh/
cat ../kectest.pub > ./authorized_keys
ls
chmod 600 authorized_keys
vim /etc/ssh/sshd_config
If there is no vim, run yum -y install vim to install it first. Press "I" on the keyboard to enter the edit operation, and perform the modification.
Modification:
PasswordAuthentication no # Login with the password is not allowed.
The following figures show the modification.
Press Esc to exit the edit mode, and then enter :wq to save and exit. Restart sshd
service sshd restart
service sshd restart
All configurations have been completed.
Password is displayed in grey and cannot be edited. Only the login with the key is allowed. In this case, select the key generated previously, and click OK to log in.
Pure Mode