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