尊龙凯时人生就是搏

ÔõÑùʹÓÃË«ÒòËØÉí·ÝÑéÖ¤±£»¤CentOSЧÀÍÆ÷µÄ»á¼ûÇå¾²

ÔõÑùʹÓÃË«ÒòËØÉí·ÝÑéÖ¤±£»¤centosЧÀÍÆ÷µÄ»á¼ûÇå¾²

ÕªÒª£ºËæ×ÅÍøÂç¹¥»÷µÄÔö¶à £¬±£»¤Ð§ÀÍÆ÷µÄ»á¼ûÇå¾²±äµÃÓÈΪÖ÷Òª¡£Ë«ÒòËØÉí·ÝÑéÖ¤ÊÇÒ»ÖÖÔöǿЧÀÍÆ÷Çå¾²µÄÒªÁì¡£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚCentOSЧÀÍÆ÷ÉÏʹÓÃË«ÒòËØÉí·ÝÑéÖ¤ £¬ÒÔÌá¸ß»á¼ûÇå¾²ÐÔ¡£

Òªº¦´Ê£ºË«ÒòËØÉí·ÝÑéÖ¤ £¬CentOSЧÀÍÆ÷ £¬»á¼ûÇå¾²ÐÔ £¬´úÂëʾÀý

Ò»¡¢Ê²Ã´ÊÇË«ÒòËØÉí·ÝÑéÖ¤

Ë«ÒòËØÉí·ÝÑéÖ¤ÊÇָͨ¹ýʹÓÃÁ½ÖÖÒÔÉϲî±ðµÄÉí·ÝÑéÖ¤ÒªÏòÀ´ÑéÖ¤Óû§µÄÉí·Ý¡£³£¼ûµÄÉí·ÝÑéÖ¤ÒªËØ°üÀ¨£ºÃÜÂë¡¢Ö¸ÎÆ¡¢ÁîÅƵÈ¡£ÔڹŰåµÄµ¥ÒòËØÉí·ÝÑéÖ¤ÖÐ £¬Ö»ÐèÒªÊäÈëÓû§ÃûºÍÃÜÂë¼´¿ÉµÇ¼ £¬¶øË«ÒòËØÉí·ÝÑéÖ¤ÔòÐèÒªÓû§Ìṩ³ýÁËÃÜÂëÍâµÄÁíÍâÒ»ÖÖÉí·Ý֤ʵ £¬ÒÔÔöÌíÇå¾²ÐÔ¡£

ÔÚ±¾ÎÄÖÐ £¬ÎÒÃǽ«Ê¹ÓÃÃÜÂëºÍÁîÅÆÕâÁ½ÖÖ²î±ðµÄÉí·ÝÑéÖ¤ÒªÏòÀ´ÊµÏÖË«ÒòËØÉí·ÝÑéÖ¤¡£

¶þ¡¢ÉèÖÃCentOSЧÀÍÆ÷

×°ÖÃËùÐèÈí¼þ°ü

Ê×ÏÈ £¬ÎÒÃÇÐèҪװÖÃËùÐèµÄÈí¼þ°ü¡£ÔÚÖÕ¶ËÖÐÊäÈëÒÔÏÂÏÂÁ

sudo yum install -y epel-release
sudo yum install -y pam_radius_auth

µÇ¼ºó¸´ÖÆ

ÉèÖÃRADIUSЧÀÍÆ÷

RADIUS£¨Remote Authentication Dial-In User Service£©Ð§ÀÍÆ÷ÓÃÓÚÑéÖ¤ÁîÅÆ¡£ÔÚ±¾Ê¾ÀýÖÐ £¬ÎÒÃǽ«Ê¹ÓÃFreeRADIUS×÷ΪRADIUSЧÀÍÆ÷¡£

·­¿ªRADIUSЧÀÍÆ÷ÉèÖÃÎļþ/etc/raddb/clients.conf £¬²¢Ìí¼ÓÒÔÏÂÄÚÈÝ£º

client YOUR_SERVER_IP {
    secret          = YOUR_SHARED_SECRET
    shortname       = YOUR_SERVER_NAME
}

µÇ¼ºó¸´ÖÆ

½«YOUR_SERVER_IPÌ滻ΪÄãµÄЧÀÍÆ÷IPµØµã £¬YOUR_SHARED_SECRETÌ滻ΪÄãºÍRADIUSЧÀÍÆ÷Ö®¼ä¹²ÏíµÄÉñÒþÃØÔ¿ £¬YOUR_SERVER_NAMEÌ滻ΪÄãµÄЧÀÍÆ÷Ãû³Æ¡£

ÖØÆôRADIUSЧÀÍÆ÷ÒÔʹ¸ü¸ÄÉúЧ¡£

ÉèÖÃPAMÄ£¿é

PAM£¨Pluggable Authentication Modules£©Ä£¿éÓÃÓÚ¼¯³ÉÁîÅÆÑéÖ¤¡£ÔÚÖÕ¶ËÖÐÊäÈëÒÔÏÂÏÂÁî·­¿ªPAMÄ£¿éÉèÖÃÎļþ£º

sudo vi /etc/pam.d/sshd

µÇ¼ºó¸´ÖÆ

ÔÚÎļþĩβÌí¼ÓÒÔÏÂÄÚÈÝ£º

auth required pam_radius_auth.so debug

µÇ¼ºó¸´ÖÆ

ÉúÑIJ¢¹Ø±ÕÎļþ¡£

ÖØмÓÔØSSHЧÀÍ

ÔÚÖÕ¶ËÖÐÊäÈëÒÔÏÂÏÂÁîÖØмÓÔØSSHЧÀÍ£º

sudo systemctl restart sshd

µÇ¼ºó¸´ÖÆ

Èý¡¢²âÊÔË«ÒòËØÉí·ÝÑéÖ¤

ÏÖÔÚ £¬ÎÒÃÇ¿ÉÒÔ²âÊÔË«ÒòËØÉí·ÝÑéÖ¤ÊÇ·ñÀֳɡ£

ʵÑéͨ¹ýSSHÅþÁ¬µ½Ð§ÀÍÆ÷

ÔÚÖÕ¶ËÖÐÊäÈëÒÔÏÂÏÂÁîʵÑéͨ¹ýSSHÅþÁ¬µ½Ð§ÀÍÆ÷£º

ssh username@your_server_ip

µÇ¼ºó¸´ÖÆ

Çë×¢ÖØ £¬ÕâÀïµÄusernameÊÇÄãµÄЧÀÍÆ÷Óû§Ãû £¬your_server_ipÊÇÄãµÄЧÀÍÆ÷IPµØµã¡£

ÊäÈëÃÜÂë

µ±ÌáÐÑÊäÈëÃÜÂëʱ £¬ÊäÈëÄãµÄÃÜÂë²¢°´Ï»سµ¼ü¡£

ÊäÈëÁîÅÆ´úÂë

½ÓÏÂÀ´ £¬Ä㽫±»ÌáÐÑÊäÈëÁîÅÆ´úÂ롣ƾ֤ÄãʹÓõÄÁîÅÆÀàÐÍ £¬ÊäÈëÏìÓ¦µÄ´úÂë²¢°´Ï»سµ¼ü¡£

ÈôÊÇÄãÊäÈëµÄÁîÅÆ´úÂë׼ȷ £¬Ä㽫ÀֳɵǼµ½Ð§ÀÍÆ÷¡£

ËÄ¡¢×ܽá

ͨ¹ýʹÓÃË«ÒòËØÉí·ÝÑéÖ¤À´±£»¤CentOSЧÀÍÆ÷µÄ»á¼ûÇå¾² £¬ÎÒÃÇ¿ÉÒÔÔöÌíЧÀÍÆ÷µÄÇå¾²ÐÔ¡£±¾ÎÄÏÈÈÝÁËÔõÑùÔÚCentOSЧÀÍÆ÷ÉÏÉèÖÃË«ÒòËØÉí·ÝÑéÖ¤ £¬²¢ÌṩÁËÏìÓ¦µÄ´úÂëʾÀý¡£Ï£ÍûÕâƪÎÄÕÂÄܹ»×ÊÖúÄã¸üºÃµØ±£»¤Ð§ÀÍÆ÷µÄ»á¼ûÇå¾²ÐÔ¡£

²Î¿¼×ÊÁÏ£º

https://www.tecmint.com/secure-ssh-with-two-factor-authentication-in-centos/

ÒÔÉϾÍÊÇÔõÑùʹÓÃË«ÒòËØÉí·ÝÑéÖ¤±£»¤CentOSЧÀÍÆ÷µÄ»á¼ûÇå¾²µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是搏ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是搏ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是搏

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ