CentOS 6 Configure Public key authentication Service

Source: Internet
Author: User

System: centos6.5

OpenSSL version: 6.9P1

The/etc/ssh/sshd_config configuration file makes the following modifications:

Rsaauthentication Yes

Pubkeyauthentication Yes

authorizedkeyscommand/usr/bin/ldap_ssh_key.sh

Authorizedkeyscommanduser Nobody


Then give the/usr/bin/ldap_ssh_key.sh file 755 permission.


ldap_ssh_key.sh Script code:

#!/bin/bash

If ["$" = = "Wangqilong"]; Then

echo "Ssh-rsa aaaab3nzac1yc2eaaaabiwaaaqeavekaks3f9a+ddn7g3+chvzu/s4cvxbts/pm3bnzs4nttijrjfp69131xabf0bokm/sr9+ nvtrmlf5/qtfxpcvpcuzg/dcgogr3ex7krp7bryskgcnlc3dlpxdjaspa39ndsujfdptvl+ihdsctxegf95mfc/ hixdcrdogiijah7osy8v1ljuemernwvlq0g9twwuei93ncsjjzkrlnao8ylmqk/ylrvpkehbfuxa04d/ 9pan8qcra4dz2uajxpsaz1e1icn0tgratwjpzhjckljcjzq4h5ku03ipwrewx2hcuxf3daeh9+9xnmwu7dvthgmmqolxw5rp2kfd5kvclq== "

Fi


Some scripts primarily enter the contents of the user's public key key.

This article is from "Smile_ Youth" blog, please be sure to keep this source http://smileyouth.blog.51cto.com/7273768/1749167

CentOS 6 Configure Public key authentication Service

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.