{"id":18922,"date":"2025-05-06T08:39:00","date_gmt":"2025-05-06T00:39:00","guid":{"rendered":"https:\/\/www.bookcard.net\/wordpress\/?p=18922"},"modified":"2025-05-09T20:39:19","modified_gmt":"2025-05-09T12:39:19","slug":"openwrt_ssh","status":"publish","type":"post","link":"https:\/\/www.bookcard.net\/wordpress\/openwrt_ssh\/","title":{"rendered":"OpenWrt\u914d\u7f6eSSH"},"content":{"rendered":"<figure id=\"attachment_18924\" aria-describedby=\"caption-attachment-18924\" style=\"width: 1280px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2025\/05\/OpenWrt_SSH.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18924\" src=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2025\/05\/OpenWrt_SSH.jpg\" alt=\"OpenWrt\u914d\u7f6eSSH\" width=\"1280\" height=\"800\" srcset=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2025\/05\/OpenWrt_SSH.jpg 1280w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2025\/05\/OpenWrt_SSH-300x188.jpg 300w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2025\/05\/OpenWrt_SSH-768x480.jpg 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><figcaption id=\"caption-attachment-18924\" class=\"wp-caption-text\">OpenWrt\u914d\u7f6eSSH<\/figcaption><\/figure>\n<figure id=\"attachment_18923\" aria-describedby=\"caption-attachment-18923\" style=\"width: 1280px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2025\/05\/OpenWrt_SSH_.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18923\" src=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2025\/05\/OpenWrt_SSH_.jpg\" alt=\"OpenWrt\u914d\u7f6eSSH\" width=\"1280\" height=\"800\" srcset=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2025\/05\/OpenWrt_SSH_.jpg 1280w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2025\/05\/OpenWrt_SSH_-300x188.jpg 300w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2025\/05\/OpenWrt_SSH_-768x480.jpg 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><figcaption id=\"caption-attachment-18923\" class=\"wp-caption-text\">OpenWrt\u914d\u7f6eSSH<\/figcaption><\/figure>\n<p>\u300eSSH\u300f\u5373\u4fc2\u300eSecure Shell\u300f,\u57fa\u65bc\u547d\u4ee4\u884c\u754c\u9762\u9060\u7a0b\u767b\u9304,\u543e\u4f7f\u59b3\u4fc2\u300eOpenWrt\u300f\u9762\u524d\u64cd\u4f5c,\u58f9\u65e6\u4f7f\u7528\u59b3\u79bb\u543e\u958b\u4f62.<\/p>\n<p>\u9996\u5148\u300eOpenWrt\u300f\u4e3b\u6a5f\u914d\u7f6eSSH,\u7de8\u8f2f\u300edropbear\u300f\u6a94<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"553\">vim\u00a0 \/etc\/config\/dropbear<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7de8\u8f2f\u300edropbear\u300f, \u884c\u982d\u300e#\u300f\u4fc2\u6ce8\u91cb,\u522a\u5de6\u4f62.<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"277\">config dropbear<\/td>\n<td width=\"277\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td width=\"277\">option enable\u00a0\u00a0 &#8216;1&#8217;<\/td>\n<td width=\"277\">1:\u4f7f\u80fdSSH<\/p>\n<p>0:\u7981\u5236SSH<\/td>\n<\/tr>\n<tr>\n<td width=\"277\">option PasswordAuth\u00a0\u00a0 &#8216;on&#8217;<\/td>\n<td width=\"277\">on: \u5141\u8a31\u7528\u5bc6\u78bc\u767b\u9304<\/td>\n<\/tr>\n<tr>\n<td width=\"277\">option RootPasswordAuth\u00a0\u00a0 &#8216;on&#8217;<\/td>\n<td width=\"277\">on: \u5141\u8a31root\u5e33\u6236\u7528\u5bc6\u78bc\u767b\u9304<\/td>\n<\/tr>\n<tr>\n<td width=\"277\">option RootLogin\u00a0 &#8216;1&#8217;<\/td>\n<td width=\"277\">1: \u5141\u8a31root\u5e33\u6236\u767b\u9304<\/p>\n<p>0: \u7981\u5236root\u5e33\u6236\u767b\u9304<\/td>\n<\/tr>\n<tr>\n<td width=\"277\">option Port\u00a0 &#8217;22&#8217;<\/td>\n<td width=\"277\">SSH\u57e0\u9ed8\u8a8d22<\/td>\n<\/tr>\n<tr>\n<td width=\"277\">option BannerFile\u00a0 &#8216;\/etc\/banner&#8217;<\/td>\n<td width=\"277\">\u6b61\u8fce\u754c\u9762<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u64b3\u300eesc\u300f\u9375\u586b\u300e:wq\u300f\u4fdd\u5b58\u5f8c\u9000\u51favim.<\/p>\n<p>\u5982\u679croot\u5e33\u6236\u672a\u8a2d\u5b9a\u5bc6\u78bc, \u300eSSH\u300f\u4fc2\u767b\u9304\u543e\u5230.<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"553\">Prrmission denied, please try again.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5982\u679c\u91cd\u88c5\u300eOpenWrt\u300f, \u4fc2linux\u7aef\u8981\u91cd\u7f6e\u5bc6\u9205,\u300eusername\u300f\u5e33\u6236\u540d<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"553\">ssh-keygen -f\u00a0 &#8216;\/home\/username\/.ssh\/known_hosts&#8217;\u00a0 -R\u00a0 &#8216;openwrt&#8217;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4fc2\u300eOpenWrt\u300f\u4e3b\u6a5f\u7528\u300epasswd\u300f\u547d\u4ee4\u6539root\u5e33\u6236\u5bc6\u78bc.<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"296\">passwd<\/td>\n<td width=\"257\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td width=\"296\">Changing password for root<\/td>\n<td width=\"257\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td width=\"296\">new password:<\/td>\n<td width=\"257\">\u586broot\u5e33\u6236\u5bc6\u78bc<\/td>\n<\/tr>\n<tr>\n<td width=\"296\">Retype password:<\/td>\n<td width=\"257\">\u518d\u586b\u58f9\u6b21<\/td>\n<\/tr>\n<tr>\n<td width=\"296\">Password for root changed by root<\/td>\n<td width=\"257\">&nbsp;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u91cd\u555f\u300eSSH\u300f\u670d\u52d9<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"553\">\/etc\/init.d\/dropbear restart<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>\u4fc2\u300eLinux\u300f\u4e3b\u6a5f\u64b3\u300ectrl+alt+t\u300f\u958b\u555f\u7aef\u7d42\u7aef<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"553\">ssh\u00a0\u00a0 root@openwrt<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>\u4fc2\u300eWindows\u300f\u4e3b\u6a5fcmd\u547d\u4ee4\u884c\u586b<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"553\">ssh\u00a0\u00a0 root@openwrt<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u300eSSH\u300f\u5373\u4fc2\u300eSecure Shell\u300f,\u57fa\u65bc\u547d\u4ee4\u884c\u754c\u9762\u9060\u7a0b\u767b\u9304,\u543e\u4f7f\u59b3\u4fc2\u300eOpenWrt\u300f\u9762\u524d\u64cd\u4f5c,\u58f9\u65e6\u4f7f &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/openwrt_ssh\/\" class=\"more-link\">\u7e7c\u7e8c\u95b1\u8b80 <span class=\"screen-reader-text\">OpenWrt\u914d\u7f6eSSH<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[281,6],"tags":[282,8],"class_list":["post-18922","post","type-post","status-publish","format-standard","hentry","category-openwrt","category-network","tag-openwrt","tag-network","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/18922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/comments?post=18922"}],"version-history":[{"count":3,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/18922\/revisions"}],"predecessor-version":[{"id":18939,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/18922\/revisions\/18939"}],"wp:attachment":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/media?parent=18922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/categories?post=18922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/tags?post=18922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}