{"id":4213,"date":"2019-07-26T00:06:32","date_gmt":"2019-07-25T16:06:32","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=4213"},"modified":"2019-07-26T00:06:34","modified_gmt":"2019-07-25T16:06:34","slug":"ssh-keyscan","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/ssh-keyscan","title":{"rendered":"ssh-keyscan\u547d\u4ee4 – \u6536\u96c6\u4e3b\u673a\u7684ssh\u516c\u94a5"},"content":{"rendered":"\n

ssh-keyscan\u547d\u4ee4\u662f\u4e00\u4e2a\u6536\u96c6\u5927\u91cf\u4e3b\u673a\u516c\u94a5\u7684\u5b9e\u7528\u5de5\u5177\u3002\u5b83\u7684\u76ee\u7684\u662f\u521b\u5efa\u548c\u9a8c\u8bc1\u201cssh_known_hosts\u201d\u6587\u4ef6\u3002<\/p>\n\n\n\n

ssh-keyscan\u547d\u4ee4\u4ec5\u652f\u6301ssh\u534f\u8bae\u7248\u672c1\uff0c\u5728ssh\u534f\u8bae\u7248\u672c2\u65e0\u6cd5\u4f7f\u7528\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f: <\/strong> ssh-keyscan [\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>
-f<\u6587\u4ef6\u540d><\/td>\u4ece\u6307\u5b9a\u6587\u4ef6\u4e2d\u8bfb\u53d6\u201c\u5730\u5740\u5217\u8868\u3001\u540d\u5b57\u5217\u8868\u201d\u5bf9<\/td><\/tr>
-p<\u7aef\u53e3><\/td>\u6307\u5b9a\u8fde\u63a5\u8fdc\u7a0b\u4e3b\u673a\u7684\u7aef\u53e3<\/td><\/tr>
-T<\u8d85\u65f6\u65f6\u95f4><\/td>\u6307\u5b9a\u8fde\u63a5\u5c1d\u8bd5\u7684\u8d85\u65f6\u65f6\u95f4<\/td><\/tr>
-t<\u5bc6\u94a5\u7c7b\u578b><\/td>\u6307\u5b9a\u8981\u521b\u5efa\u7684\u5bc6\u94a5\u7c7b\u578b<\/td><\/tr>
-v<\/td>\u4fe1\u606f\u6a21\u5f0f\uff0c\u6253\u5370\u8c03\u8bd5\u4fe1\u606f<\/td><\/tr><\/tbody><\/table>\n\n\n\n

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

\u6536\u96c6\u4e3b\u673assh\u516c\u94a5\uff0c\u5e76\u8f93\u51fa\u8c03\u8bd5\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# ssh-keyscan -v 202.120.240.65<\/pre>\n\n\n\n

\u663e\u793a\u4e3b\u673a192.168.0.2\u7684RSA\u4e3b\u673a\u5bc6\u94a5\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# ssh-keyscan 192.168.0.2<\/pre>\n\n\n\n

\u663e\u793a\u4e3b\u673a192.168.0.2\u7684DSA\u4e3b\u673a\u5bc6\u94a5\uff1a <\/p>\n\n\n\n

[root@linuxcool ~]# ssh-keyscan -t dsa 192.168.0.2 <\/pre>\n\n\n\n

\u6253\u5370\u8c03\u8bd5\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# ssh-keyscan -v<\/pre>\n\n\n\n

\u5f3a\u5236\u4f7f\u7528IPv4\u5730\u5740\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# ssh-keyscan -4<\/pre>\n\n\n\n

<\/p>\n","protected":false},"excerpt":{"rendered":"

ssh-keyscan\u547d\u4ee4\u662f\u4e00\u4e2a\u6536\u96c6\u5927\u91cf\u4e3b\u673a\u516c\u94a5\u7684\u5b9e\u7528\u5de5\u5177\u3002\u5b83\u7684\u76ee\u7684\u662f\u521b\u5efa\u548c\u9a8c\u8bc1\u201cssh_known_host […]<\/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\/4213"}],"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=4213"}],"version-history":[{"count":2,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4213\/revisions"}],"predecessor-version":[{"id":4245,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4213\/revisions\/4245"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=4213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=4213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=4213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}