Putty Connecting the CentOS server

Source: Internet
Author: User
Tags centos server

There are many ways to ps:client the server, usually the C/s mode.


Common ways to connect servers are:

1. User name and password login, security level is very low .

2. Modify the port (set the default 22 port to a different port) to log on with a low security level .

3. Set the complex password login, security level bottom .

4. Log in to the server with the secret key, the highest security level .

First, the following describes the use of Putty login to the CentOS server, the following:

    1. Download Putty tool or CRT, personal habits use putty, then open Puttygen this tool


    2. 650) this.width=650; "style=" float:left; "src=" http://s3.51cto.com/wyfs02/M01/73/9D/ Wkiol1ycyo2yianvaab6auqh2z8590.jpg "title=" 1.png "alt=" Wkiol1ycyo2yianvaab6auqh2z8590.jpg "/>

    3. Use the Puttygen tool to generate the key pair (the key will be generated when prompted by mouse swipe to generate)

    4. 650) this.width=650; "style=" float:left; "src=" http://s3.51cto.com/wyfs02/M01/73/A1/ Wkiom1ycaflbxtdmaaexplka6hq716.jpg "title=" 2.png "alt=" Wkiom1ycaflbxtdmaaexplka6hq716.jpg "/>

    5. 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/9E/wKioL1YCa3jRp0HNAAIB__0dAfw496.jpg "title=" 3.png " alt= "Wkiol1yca3jrp0hnaaib__0dafw496.jpg"/>

    6. Put the generated public and private keys in a directory to save ( if the private key is lost, there will be a server can not log on, remember!!) )


Second, the server-side operation is as follows:

1.yum-y Install Openssh-server openssh-clients

2. Server-side generate secret key pair ssh-keygen-t RSA

3. After generating the secret key, there will be an. SSH directory, which has the public key (. pub) and private key of the server, which makes it easy to jump to a different server.

4. Create the Authorized_keys file in the. ssh directory and pour the client's public key into the Authorized_keys file. The following is the public key of the client side.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/9F/wKioL1YCbavCxnIAAAHA-7OVRuk601.jpg "title=" 4.png " alt= "Wkiol1ycbavcxniaaaha-7ovruk601.jpg"/>

5. Authorizing/root/.ssh/directory permissions

chmod 700/root/.ssh/


6. Server Modification/etc/ssh/sshd_config configuration file ( backup first, then modify!!!) ), open key authentication!! 650) this.width=650; "style=" float:left; "src=" Http://s3.51cto.com/wyfs02/M01/73/9F/wKioL1YCbn6ilTV9AAEOOdke_ Zg960.jpg "title=" 5.png "alt=" Wkiol1ycbn6iltv9aaeoodke_zg960.jpg "/>







650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/A2/wKiom1YCcCejIOB2AAJdGIpgo4c638.jpg "title=" 6.png " alt= "Wkiom1ycccejiob2aajdgipgo4c638.jpg"/>

7. Restart the SSH Services service sshd restart or/etc/init.d/sshd restart


Verify:

Client Login

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/9F/wKioL1YCcVSxjc7WAAEPsKfW6o4968.jpg "title=" 7.png " alt= "Wkiol1yccvsxjc7waaepskfw6o4968.jpg"/>


Set Secret key

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/A2/wKiom1YCciPiGoCOAAIJ4IUdwTU282.jpg "title=" 8.png " alt= "Wkiom1yccipigocoaaij4iudwtu282.jpg"/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/A2/wKiom1YCcpKTiirYAADKxmhDyGk092.jpg "title=" 9.png " alt= "Wkiom1yccpktiiryaadkxmhdygk092.jpg"/>

OK Operation Complete ~ ~



This article is from the "Small Sea" blog, please be sure to keep this source http://hason.blog.51cto.com/8271396/1697555

Putty Connect to the CentOS server

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.