Use Putty to connect to the Centos Server

Source: Internet
Author: User
Tags centos server

Use Putty to connect to the Centos Server

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 ~~

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.