Log on to the CentOS system using the RSA key

Source: Internet
Author: User
Tags ssh centos

In order to secure the system CentOS using SSH RSA authentication Mode login system, Windows system uses SECURECRT to generate public and private keys, the public key uploaded to the server user directory/root/.ssh directory.

[Root@localhost ~]# mkdir. ssh//Create a hidden directory. SSH

[Root@localhost ~]# chmod. ssh//Change the permissions the main is read and write to execute permissions, other groups or others do not have permissions.

[Root@localhost ~]# ssh-keygen-x-F identity.pub >>/root/.ssh/authorized_keys

[root@localhost ~]# CD. SSH

[Root@localhost. ssh]# ls

Authorized_keys

[Root@localhost. ssh]# cat/etc/ssh/sshd_config//View OpenSSH configuration files

Protocol 2

Syslogfacility Authpriv

Passwordauthentication no//Modify shutdown/etc/passwd authentication mode because the RSA authentication is now used.

Challengeresponseauthentication No

Gssapiauthentication No

Gssapicleanupcredentials Yes

Usepam No

Acceptenv LANG lc_ctype lc_numeric lc_time lc_collate lc_monetary lc_messages

Acceptenv lc_paper lc_name lc_address lc_telephone lc_measurement

Acceptenv lc_identification Lc_all LANGUAGE

Acceptenv xmodifiers

x11forwarding Yes

subsystem Sftp/usr/libexec/openssh/sftp-server

Windows platform generates RSA using SECURECRT

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.