{"id":4211,"date":"2019-07-26T00:06:12","date_gmt":"2019-07-25T16:06:12","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=4211"},"modified":"2022-06-10T15:28:39","modified_gmt":"2022-06-10T07:28:39","slug":"sshd","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/sshd","title":{"rendered":"sshd\u547d\u4ee4 – openssh\u670d\u52a1\u5668\u5b88\u62a4\u8fdb\u7a0b"},"content":{"rendered":"\n

sshd\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cSSH daemon\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8eopenssh\u670d\u52a1\u5668\u5b88\u62a4\u8fdb\u7a0b\u3002openssh\u5957\u4ef6\u80fd\u591f\u4e3a\u4e24\u53f0\u4e3b\u673a\u4e4b\u95f4\u5efa\u7acb\u52a0\u5bc6\u7684\u3001\u53ef\u4fe1\u4efb\u7684\u6570\u636e\u901a\u4fe1\u670d\u52a1\uff0c\u662frlogin\u4e0ersh\u7b49\u660e\u6587\u6570\u636e\u901a\u4fe1\u7684\u66ff\u4ee3\u54c1\uff0c\u800csshd\u547d\u4ee4\u5373\u4e3aopenssh\u5957\u4ef6\u4e2d\u7684\u6838\u5fc3\u7a0b\u5e8f\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f: <\/strong> sshd [\u53c2\u6570] <\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-4<\/td>\u5f3a\u5236\u4f7f\u7528IPv4\u5730\u5740<\/td><\/tr>
-6<\/td>\u5f3a\u5236\u4f7f\u7528IPv6\u5730\u5740 <\/td><\/tr>
-D<\/td>\u4ee5\u975e\u540e\u53f0\u5b88\u62a4\u8fdb\u7a0b\u7684\u65b9\u5f0f\u8fd0\u884c\u670d\u52a1<\/td><\/tr>
-d<\/td>\u8c03\u8bd5\u6a21\u5f0f<\/td><\/tr>
-e<\/td>\u76f4\u63a5\u663e\u793a\u62a5\u9519\u4fe1\u606f<\/td><\/tr>
-f<\u914d\u7f6e\u6587\u4ef6><\/td>\u6307\u5b9a\u670d\u52a1\u5668\u7684\u914d\u7f6e\u6587\u4ef6<\/td><\/tr>
-g<\u767b\u5f55\u8fc7\u671f\u65f6\u95f4><\/td>\u6307\u5b9a\u5ba2\u6237\u7aef\u767b\u5f55\u7684\u8fc7\u671f\u65f6\u95f4<\/td><\/tr>
-h<\u4e3b\u673akey\u6587\u4ef6><\/td>\u6307\u5b9a\u8bfb\u53d6\u4e3b\u673a\u5bc6\u94a5\u6587\u4ef6<\/td><\/tr>
-i<\/td>sshd\u4ee5inetd\u65b9\u5f0f\u8fd0\u884c<\/td><\/tr>
-o<\u9009\u9879><\/td>\u6307\u5b9a\u670d\u52a1\u914d\u7f6e\u9009\u9879<\/td><\/tr>
-p<\u7aef\u53e3><\/td>\u6307\u5b9a\u4f7f\u7528\u7684\u7aef\u53e3\u53f7<\/td><\/tr>
-q<\/td>\u4e0d\u5c06\u4efb\u4f55\u4fe1\u606f\u5199\u5165\u7cfb\u7edf\u65e5\u5fd7<\/td><\/tr>
-t<\/td>\u6d4b\u8bd5\u6a21\u5f0f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u4ee5\u8c03\u8bd5\u6a21\u5f0f\u8fd0\u884csshd\u670d\u52a1\u7a0b\u5e8f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# \/usr\/sbin\/sshd -d<\/strong>\r\ndebug1: sshd version OpenSSH_7.8, OpenSSL 1.1.1 FIPS  11 Sep 2018\r\ndebug1: private host key #0: ssh-rsa SHA256:6n6eWlVRVtXxbDBBA5A05eRVxbyh4ImR0mdvcwIEUdc\r\ndebug1: private host key #1: ecdsa-sha2-nistp256 SHA256:212\/FhZ+6JFs5psuMJx9+5alyW6QDzviE0miulDPiKk\r\ndebug1: private host key #2: ssh-ed25519 SHA256:3t6D+ZUPab8itrLMEEI+btP0y4YKN3pUa3JM0xTW6\/o\r\ndebug1: rexec_argv[0]='\/usr\/sbin\/sshd'\r\ndebug1: rexec_argv[1]='-d'\r\ndebug1: Set \/proc\/self\/oom_score_adj from 0 to -1000\r\ndebug1: Bind to port 22 on 0.0.0.0.\r\nBind to port 22 on 0.0.0.0 failed: Address already in use.\r\ndebug1: Bind to port 22 on ::.\r\nBind to port 22 on :: failed: Address already in use.\r\nCannot bind any address.\r<\/pre>\n\n\n\n

\u4ee5\u6d4b\u8bd5\u6a21\u5f0f\u8fd0\u884csshd\u670d\u52a1\u7a0b\u5e8f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# \/usr\/sbin\/sshd -t <\/strong><\/pre>\n\n\n\n

\u5f3a\u5236\u57fa\u4e8eIPv6\u5730\u5740\u8fdb\u884c\u670d\u52a1\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# \/usr\/sbin\/sshd -6<\/strong><\/pre>\n","protected":false},"excerpt":{"rendered":"

sshd\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cSSH daemon\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8eopenssh\u670d\u52a1\u5668\u5b88\u62a4\u8fdb\u7a0b\u3002opens […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4211"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=4211"}],"version-history":[{"count":7,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4211\/revisions"}],"predecessor-version":[{"id":10256,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4211\/revisions\/10256"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=4211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=4211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=4211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}