The previous section learned the static IP configuration of Centos7, and today learns to use putty and Xshell remote connections CENTOS7
First, learn to use putty.
1. Download the Putty Package
Https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- Then install putty, here not too much to repeat, open putty
* Fill in the box with your own IP 192.168.40.133, and a name in the bottom box chinantfy-01
Then left click on translation Select Utf-8, go back to session click Save, then click Open (Before you start the virtual machine Centos7)
- The first link will appear a pop-up window, click Yes
- enter root, and then enter the password, the login succeeded
2. Learn to use Putty Key link Centos7
Start menu Puttygen
Open and click Generate Generate secret Key
* Password can be empty or input, here is the test, I temporarily do not set the password, the above box of the public key is selected to copy, first saved to a text, and then click on the two save below, save the public key and the private key, and remember the name;
Next, put the public key into Linux,
Create the/root/.ssh folder first, and if it is another user, the file path is/home/user name/.ssh mkdir/root/.sshchmod 700/root/. Sshvi/root/.ssh/authorized_keys
This step is to create a file holding the public key, after executing the above command, press I into insert mode, copy the public key just saved, ESC exit Insert mode: Wq Save and exit
Next close selinux
vi/etc/selinux/config
Change selinux after enforcing to disabled, Save and exit, enter init 6 restart Centos7
Close putty reopen
Click on the chinantfy-01 and then click Load
next to the left Auth
Select the name of the private key you just saved
return to session Click Save to save the configuration, Open Putty window
Enter the username root,
because no password was previously set, directly landed Centos7
The above is the use of Putty connection Centos7 method, user name plus password login and secret key login
two. Xshell connection centos7
1 First download Xshell
https://www.netsarang.com/ products/xsh_overview.html
Open after installation
Click the tools above to create a new user key Generation wizard
Fill in the Key name and password, my name here is the default, the password is left blank
As with the previous putty, save the public key copy all
2. Next, learn Xshell's account password link centos7
Click the top left corner to create a new
Name customization, host fill IP address
Point left terminal, encoding select Utf-8
Click Connect user authentication, enter Centos7 's account number, password,
Select the chinantfy-01 connection you just created when you're done
The first connection will also pop the window, choose to accept and save
It's a good landing here,
3. The above learned Xshell user password connection, and key pair generation, next learn to use the secret key connection Xshell
Input
vi /root/.ssh/authorized_keys
Edit the secret key file again
I enter into the insert mode, the public key that just created with Xshell is copied in, here I for the future good distinction, separately added notes
ESC exits insert mode: Wq Save and exit
Click the plus sign in the upper left corner of Xshell
Right-click on the Chinantfy-01 property
User authentication, method Select Public key, user key Select the key you just generated and click OK
Because there is no login password to set the key, so directly to the root user connected to the CENTOS7;
The above is the use of Putty and Xshell connection Centos7 methods and procedures, it is important to note that the public key to replicate accurate, Vi/root/.ssh/authorized_keys this command and file path to be accurate, the beginning of practice because of not careful, These two problems often go wrong, be sure to pay attention to.
Linux Learning Notes (iii) Putty, Xshell application