CentOS 7.x via key login ssh

Source: Internet
Author: User
Tags ssh config ssh config file
1. Establish the key pair [[email protected]~]$ ssh-keygen2, install the public key on the server [[email protected] ~]$ CD. Ssh[[email protected]. ssh]$ Cat Id_rsa.pub >> Authorized_keys3, in order to ensure a successful connection, ensure that the following file permissions are correct: [[email protected]. ssh]$ chmod authorized_keys[[email protected]. ssh]$ chmod ~/.ssh4, edit ssh config file, open key login function Vi/etc/ssh/sshd_configrsaauthentication yespubkeyauthentication Yes when you have completed all settings and signed in successfully by key mode, you can disable password login passwordauthentication No5, restart SSH service: [[email protected]. ssh]# systemctl Restart sshd

CentOS 7.x via key login ssh

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.