\u95ee\u9898\u4e09\uff1a\u7aef\u53e3\u88ab\u5360\u7528<\/strong><\/div>\nSSH\u8fde\u63a5\u9519\u8bef\u7684\u53e6\u4e00\u4e2a\u539f\u56e0\u662f\u5176\u4ed6\u670d\u52a1\u6216\u8fdb\u7a0b\u662f\u5426\u4e5f\u4f7f\u7528\u4e0eSSH\u670d\u52a1\u76f8\u540c\u7684\u7aef\u53e3\u3002\u4f8b\u5982\uff0cSSH\u7684\u7aef\u53e3\u53f7\u4e3a80\uff0c\u8fd9\u548chttp\u670d\u52a1\u7684\u7aef\u53e3\u51b2\u7a81\u4e86\uff0c\u5219\u7c7b\u4f3cApache\u7684\u670d\u52a1\u53ef\u80fd\u6b63\u5728\u4f7f\u7528\u76f8\u540c\u7684\u7aef\u53e3\u3002<\/p>\n
\u8981\u67e5\u770b\u5176\u4ed6\u8fdb\u7a0b\u662f\u5426\u6b63\u5728\u4f7f\u7528\u4e0eSSH\u76f8\u540c\u7684\u7aef\u53e3\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5\u65e5\u5fd7\uff1a<\/p>\n
\r\n[root@server1 ~]# journalctl -t sshd\r\n<\/pre>\n\u8be5\u547d\u4ee4\u5e94\u8fd4\u56de\u5982\u4e0b\u6240\u793a\u7684\u9519\u8bef\uff0c\u663e\u793a\u7aef\u53e3\u5df2\u88ab\u5360\u7528\u3002
\n<\/p>\n
\u89e3\u51b3\u65b9\u6cd5<\/strong><\/span><\/div>\n\u5728\u8fd9\u53ef\u4ee5\u4fee\u6539ssh\u7684\u7aef\u53e3\u53f7\uff0c\u6253\u5f00\u914d\u7f6e\u6587\u4ef6\u5c06\u7aef\u53e3\u4fee\u6539\u4e3a\u5176\u4ed6\u7684\uff0cPort 2222<\/code><\/p>\n\r\nvim \/etc\/ssh\/sshd_config \r\n\r\nPort 2222\r\n<\/pre>\n<\/p>\n
\u95ee\u9898\u56db\uff1a\u88ab\u9632\u706b\u5899\u963b\u6b62<\/strong><\/div>\n\u5982\u679c\u5c1d\u8bd5\u4e86\u4e0a\u8ff0\u6240\u6709\u65b9\u6cd5\uff0c\u4ecd\u65e0\u6cd5\u5efa\u7acbSSH\u8fde\u63a5\uff0c\u5219\u53ef\u4ee5\u770b\u770b\u9632\u706b\u5899\u662f\u5426\u963b\u6b62\u8fde\u63a5\uff1f<\/p>\n
\u89e3\u51b3\u65b9\u6cd5<\/strong><\/span><\/div>\n\u5728Cetnos8\u4e2d\uff0c\u4f7f\u7528fireawlld\u67e5\u770b\u9632\u706b\u5899\uff0c\u5e76\u5c06\u7aef\u53e3\u6dfb\u52a0\u5141\u8bb8\u91cc\u9762\uff1a<\/p>\n
\r\n[root@server1 ~]# firewall-cmd --list-all\r\n[root@server1 ~]# firewall-cmd --permanent --add-port=2222\/tcp\r\nsuccess\r\n[root@server1 ~]# firewall-cmd --reload\r\nsuccess\r\n<\/pre>\n<\/p>\n
\u95ee\u9898\u4e94\uff1a\u5df2\u7981\u7528\u5bc6\u7801\u767b\u5f55<\/strong><\/div>\n\u6709\u65f6\uff0c\u60a8\u53ef\u4ee5\u5c06SSH\u914d\u7f6e\u4e3a\u4e0d\u63a5\u53d7\u5bc6\u7801\u767b\u5f55\uff0c\u800c\u4ec5\u4f7f\u7528\u516c\u5bc6\u94a5\u8eab\u4efd\u9a8c\u8bc1\u3002\u5982\u679c\u516c\u94a5\u5728\u670d\u52a1\u5668\u4e0a\u4e0d\u53ef\u7528\u6216\u7f3a\u5c11\u79c1\u94a5\u5bf9\uff0c\u5219\u53ef\u80fd\u5bfc\u81f4\u4e0d\u80fd\u767b\u5f55\u7684\u95ee\u9898\u3002<\/p>\n
\u89e3\u51b3\u65b9\u6cd5<\/strong><\/span><\/div>\n\u8981\u68c0\u67e5\/etc\/ssh\/sshd_config<\/code>\u914d\u7f6e\u6587\u4ef6\u662f\u5426\u5141\u8bb8\u5bc6\u7801\u767b\u5f55\uff0c\u8bf7\u5c06ssh\u914d\u7f6e\u8bbe\u7f6e\u4e3a\u5982\u4e0b\uff1a<\/p>\n\r\n[root@server1 ~]# grep PasswordAuthentication \/etc\/ssh\/sshd_config \r\n#PasswordAuthentication yes\r\nPasswordAuthentication yes\r\n# PasswordAuthentication. Depending on your PAM configuration,\r\n# PAM authentication, then enable this but set PasswordAuthentication\r\n<\/pre>\n\u4e0a\u9762\u7684\u8f93\u51fa\u663e\u793a\u5141\u8bb8\u5bc6\u7801\u767b\u5f55\u3002<\/p>\n
\u603b\u7ed3<\/strong><\/div>\n\u672c\u6587\u8ba8\u8bba\u4e86SSH\u8fde\u63a5\u9519\u8bef\u7684\u4e3b\u8981\u539f\u56e0\u4ee5\u53ca\u5982\u4f55\u89e3\u51b3\u5b83\u4eec\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
SSH\u8fde\u63a5\u9519\u8bef\u7684\u5e38\u89c1\u539f\u56e0\u662f\u670d\u52a1\u672a\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u3002\u8fd9\u53ef\u80fd\u662f\u7531\u4e8e\u670d\u52a1\u610f\u5916\u5173\u95ed\u6216\u7cfb\u7edf\u91cd\u65b0\u542f\u52a8\u540e\u670d\u52a1\u672a\u542f\u52a8\u800c\u5f15\u8d77\u7684 […]<\/p>\n","protected":false},"author":309,"featured_media":219585,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-219584","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/219584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=219584"}],"version-history":[{"count":1,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/219584\/revisions"}],"predecessor-version":[{"id":219591,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/219584\/revisions\/219591"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/219585"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=219584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=219584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=219584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}