SSH first session RSA Authentication function shutdown Method 2 kinds

Source: Internet
Author: User

we use When SSH connects to a peer Linux host for the first time , an RSA authentication session appears with only 1 interactions.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/84/53/wKioL1eNiiPwbD2ZAAB4tDlO7xw366.jpg "title=" ssh001. JPG "alt=" wkiol1eniipwbd2zaab4tdlo7xw366.jpg "/> Enter Yes , the system will be created under the current user directory . ssh/know_hosts Verify the file. After that, there is no need to repeat the verification.

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M02/84/53/wKiom1eNi3eC2mg2AABWJd-tb-o806.jpg "title=" ssh002 . JPG "alt=" Wkiom1eni3ec2mg2aabwjd-tb-o806.jpg "/>

However, many ops people do not want to perform such validation within their own maintenance environment. In particular, we are writing scripts that would prefer to have direct access to the account / password verification session.

The default SSH feature for RSA authentication is called stricthostkeychecking(Strict master key validation).

2 ways To turn off this feature :

method 1:

In the. SSH directory, do not create it yourself, permission 700.

Create config file under the. ssh/directory, permissions 600, default is not, you need to create it yourself. Add "Stricthostkeychecking No" to the config file.


method 2:

The simplest and most straightforward and effective way is to modify SSH configuration file.

there is a "stricthostkeychecking ask" configuration in /etc/ssh/ssh_config , which is turned on by default.


650) this.width=650; "Src=" http://s1.51cto.com/wyfs02/M01/84/53/wKioL1eNiqTDeap_AABXc8gUygk209.jpg " Title= "ssh003. JPG "alt=" Wkiol1eniqtdeap_aabxc8guygk209.jpg "/>

we Add "stricthostkeychecking no" to the end of the configuration file.

echo "Stricthostkeychecking no" >>/etc/ssh/ssh_config

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/84/53/wKioL1eNirDBGIpSAACXIaVcMU8073.jpg "title=" ssh004 . JPG "alt=" Wkiol1enirdbgipsaacxiavcmu8073.jpg "/>

then make the SSH connection test again:

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/84/53/wKiom1eNipLz0IYTAAA_OtHC0LM329.jpg "title=" ssh005 . JPG "alt=" Wkiom1eniplz0iytaaa_othc0lm329.jpg "/>

This is the time to enter the password verification phase directly.

Finish.


This article is from the "Clark Operations" blog, please be sure to keep this source http://szcat.blog.51cto.com/665775/1827650

SSH first session RSA Authentication function shutdown Method 2 kinds

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.