To set up a CentOS key login with Xshell

Source: Internet
Author: User

Today brings the set X Shell key login

Because the Chinese x shell is used, it is easy to follow the Chinese setting
1. Click Tools------The new User Key Generation Wizard (new)

2. Then when it appears, remember the key type select RSA. In fact, the choice of DSA, can also be achieved, the two are actually different algorithms. (I used RSA) to experiment with the

3. Key length Choose your own!!! Generate public key (see picture) Next step is fine.

Here the name itself can be modified, remember the key you entered, I have been unable to solve the problem of login. The password forgot ....

4. Next, you can see the generated public key, single machine completed

The generated public key can now be duplicated, or it can be duplicated later ....

5. These operations (I have been landing through the Xshell) is easy to set
Here is the machine operation
Create the. SSH directory directly in the/root home directory (speaking of/root home directory don't be confused, root login is under/root if worry about PWD)
#mkdir. SSH

SSH is actually a hidden directory (see. XXX in front of a directory file or a normal file) is actually hidden directory LS can't see remember with ls-a

Switch to. ssh
#cd. SSH
Create a file with this file name

Create a file
#touch Authorized_key
6. Then vi!$ paste the public key that was just copied (!$ didn't forget it)

Ok save exit still Wq

7. Remember to set up the firewall and SELinux
I closed the iptables temporarily. But just as normal.
Empty firewall configuration Remember to save

#iptables-F

#/etc/init.d/iptables Save

8. Then modify SELinux (SELinux is a security mechanism)
I have directly modified the configuration file myself
#vi/etc/selinux/config

Modified the selinux=disabled
The pre-modified state is this selinux=enforcing
Of course, it can also be temporarily closed (it will open after reboot)
#setenforce 0
Remember to look at the status (personal habits)
#getenforce
can also
#/usr/sbin/sestatus-v
Because the configuration file is modified my display disabled

I remember the temporary off display status is permissive

9. Basically the setup is complete, you can open a window to test

Fill in the previously set password, login no problem!!!!!

Other tools Putty SecureCRT are can be set, key login for is more secure to log in, server security is very IMPORTANT!!!

To set up a CentOS key login with Xshell

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.