Use Putty to connect to the Centos server

Source: Internet
Author: User
Tags centos server
PS: the client has many methods to connect to the server, usually in the C/S mode. Common server connection methods include: & nb

PS: the client has many methods to connect to the server, usually in the C/S mode.

 

Common server connection methods include:

1. log on with the user name and password. the security level is very low.

2. modify the port (set the default port 22 to another port) to log on. The security level is very low.

3. set a complex password for logon at the bottom of the security level.

4. log on to the server with the key, with the highest security level.

I. The following describes how to use putty to log on to the Centos server:

  1. Download the Putty tool or CRT. I am used to using putty. then open the puttygen tool.

     

  2. Use the puttygen tool to generate a key pair (when a key is generated, you will be prompted to slide the mouse to generate the key)

  3. Save the generated public key and private key in a directory. (if the private key is lost, the server cannot log on. remember !!)

 

2. perform the following operations on the server:

1. yum-y install openssh-server openssh-clients

2. the server generates a key pair ssh-keygen-t rsa

3. after the key is generated, there will be a. ssh directory with the public key (. pub) and private key of the server to facilitate jump to other servers.

4. create the authorized_keys file under the. ssh directory, and then import the public key of the client to the authorized_keys file. The following is the public key of the client.

5. authorize/root/. ssh/directory permissions

Chmod 700/root/. ssh/

 

6. modify the/etc/ssh/sshd_config configuration file on the server (back up the file first, and then modify it !!!), Enable key authentication !!

 

 

 

 

 

 

7. restart ssh service sshd restart or/etc/init. d/sshd restart

 

Verification:

Client logon

 

Set the key

OK operation completed ~~

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.