{"id":213488,"date":"2021-03-18T08:15:52","date_gmt":"2021-03-18T00:15:52","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=213488"},"modified":"2021-03-12T15:16:11","modified_gmt":"2021-03-12T07:16:11","slug":"rescue-network-ssh","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/rescue-network-ssh.html","title":{"rendered":"Centos8\u5982\u4f55\u5728Rescue\u6a21\u5f0f\u4e0b\u914d\u7f6e\u7f51\u7edc\u548cSSH\u767b\u5f55"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u5c06\u5c55\u793a\u5982\u4f55\u4f7f\u7528Centos8\u7684DVD\u955c\u50cf\u5f15\u5bfcRescue\u6551\u63f4\u6a21\u5f0f\uff0c\u5e76\u5728\u6551\u63f4\u6a21\u5f0f\u4e2d\u542f\u7528\u7f51\u7edc\u3001\u914d\u7f6eSSH\u670d\u52a1\uff0c\u4f9b\u7528\u6237\u8fdc\u7a0b\u767b\u5f55\u8be5\u670d\u52a1\u5668<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u7cfb\u7edf\u73af\u5883<\/strong><\/div>\n

Centos8<\/p>\n

\u52a0\u8f7dISO\u955c\u50cf\uff0c\u8fdb\u5165\u6551\u63f4\u6a21\u5f0f<\/strong><\/div>\n

\u5728VMware Workstation\u4e2d\uff0c\u52a0\u8f7d\u5149\u76d8\uff0c\u5e76\u5f00\u673a\u5668\u7528\u3002\u5f00\u673a\u6309F2\uff0c\u8fdb\u5165BIOS\uff0c\u5207\u6362\u5230Boot\u9009\u9879\u5361\u3002\u5c06CD-ROM Drive\u79fb\u52a8\u5230Hard Drive\u4e0a\u9762\u3002\u6309F10\u4fdd\u5b58\u5e76\u91cd\u542f\u3002
\n\"\"
\n\u9009\u62e9Troubleshooting\uff0c\u7136\u540e\u9009\u62e9\u8fdb\u5165\u6551\u63f4\u6a21\u5f0f\u3002
\n\"\"
\n\"\"
\n\u5f53\u8fdb\u5165\u4e0b\u9762\u754c\u9762\u65f6\uff0c\u9009\u62e93\uff0c\u76f4\u63a5\u8fdb\u5165shell\u754c\u9762\u3002
\n\"\"<\/p>\n

\u5728\u6551\u63f4\u6a21\u5f0f\u914d\u7f6e\u7f51\u5361<\/strong><\/div>\n

\u9996\u5148\u4f7f\u7528ip addr<\/code>\u548cnmcli d<\/code>\u67e5\u770b\u4ee5\u4e0b\u7f51\u5361\u4fe1\u606f\uff0c\u5e76\u83b7\u53d6\u5230\u7f51\u5361\u540d\u79f0\uff0c\u4e3a\u4e0b\u4e00\u6b65\u542f\u52a8\u7f51\u5361\u4f7f\u7528\uff1a<\/p>\n

\r\n# ip addr\r\n# nmcli d\r\n<\/pre>\n

\"\"
\n\u4e0b\u9762\u6fc0\u6d3bens160\u8bbe\u5907\uff0c\u5e76\u67e5\u770b\u662f\u5426\u901a\u8fc7DHCP\u83b7\u53d6\u5230ip\u5730\u5740\uff1a<\/p>\n

\r\n# nmcli d connect ens160\r\n# ip addr\r\n<\/pre>\n

\"\"
\n\u53ef\u4ee5\u770b\u5230ens160\u7684\u72b6\u6001\u5df2\u7ecf\u662fconnected\u4e86\u3002
\n\"\"
\n\u5982\u679c\u9700\u8981\u8bbe\u7f6e\u9759\u6001ip\u5730\u5740\uff0c\u53ef\u4ee5\u4fee\u6539\u4e0b\u9762\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5e76\u91cd\u65b0\u52a0\u8f7d\u7f51\u5361\u4fe1\u606f\uff1a<\/p>\n

\r\n# vi \/etc\/sysconfig\/network-scripts\/ifcfg-ens160\r\nTYPE=Ethernet\r\nPROXY_METHOD=none\r\nBROWSER_ONLY=no\r\nBOOTPROTO=static\r\nDEFROUTE=yes\r\nIPV4_FAILURE_FATAL=no\r\nIPV6INIT=yes\r\nIPV6_AUTOCONF=yes\r\nIPV6_DEFROUTE=yes\r\nIPV6_FAILURE_FATAL=no\r\nIPV6_ADDR_GEN_MODE=stable-privacy\r\nNAME=ens160\r\nUUID=ade25366-fb36-4f7d-b47c-407005b7fc66\r\nDEVICE=ens160\r\nONBOOT=no\r\nIPADDR=192.168.43.132\r\nPREFIX=24\r\nGATEWAY=192.168.43.2\r\n<\/pre>\n

\u4e0a\u9762\u914d\u7f6e\u6587\u4ef6\u4e2d\u5c06BOOTPROTO=<\/code>\u6539\u4e3astatic\u3002\u6dfb\u52a0\u4e86IPADDR= , PREFIX= , GATEWAY= <\/code>\u51e0\u4e2a\u4fe1\u606f\u3002
\n\"\"
\n\u4e0b\u9762\u4f7f\u7528nmcli\u547d\u4ee4\u505c\u7528\u3001\u5e76\u542f\u7528\u7f51\u5361\u8bbe\u5907\uff1a<\/p>\n

\r\n# nmcli c down ens160\r\n# nmcli c up ens160\r\n<\/pre>\n

\"\"<\/p>\n

\u5728\u6551\u63f4\u6a21\u5f0f\u542f\u7528SSH\u670d\u52a1<\/strong><\/div>\n

\u4e0b\u9762\u5728\u6551\u63f4\u6a21\u5f0f\u542f\u7528SSH\u670d\u52a1\u3002\u9996\u5148\u8fdb\u5165\/etc\/ssh<\/code>\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55\u4e2d\u3002\u590d\u5236sshd_config.anaconda<\/code>\u6587\u4ef6\uff0c\u5e76\u66f4\u6539\u540d\u79f0\u4e3asshd_config<\/code><\/p>\n

\r\n# cd \/etc\/ssh\r\n# cp -p sshd_config.anaconda sshd_config\r\n<\/pre>\n

\u4e0b\u9762\u542f\u52a8sshd\u670d\u52a1\uff1a<\/p>\n

\r\n# systemctl start sshd\r\n<\/pre>\n

\u901a\u8fc7\u5ba2\u6237\u7aef\u8fdc\u7a0b\u8fde\u63a5\u6d4b\u8bd5\u4e00\u4e0b\uff0c\u9ed8\u8ba4\u6ca1\u6709root\u5bc6\u7801\u3002
\n\"\"
\n\"\"<\/p>\n

\u603b\u7ed3<\/strong><\/div>\n

\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u5c06\u5c55\u793a\u5982\u4f55\u4f7f\u7528Centos8\u7684DVD\u955c\u50cf\u5f15\u5bfcRescue\u6551\u63f4\u6a21\u5f0f\uff0c\u5e76\u5728\u6551\u63f4\u6a21\u5f0f\u4e2d\u542f\u7528\u7f51\u7edc\u3001\u914d\u7f6eSSH\u670d\u52a1\uff0c\u4f9b\u7528\u6237\u8fdc\u7a0b\u767b\u5f55\u8be5\u670d\u52a1\u5668\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Centos8 \u5728VMware Workstation\u4e2d\uff0c\u52a0\u8f7d\u5149\u76d8\uff0c\u5e76\u5f00\u673a\u5668\u7528\u3002\u5f00\u673a\u6309F2\uff0c\u8fdb\u5165BIOS\uff0c\u5207\u6362 […]<\/p>\n","protected":false},"author":309,"featured_media":213489,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-213488","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\/213488","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=213488"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/213488\/revisions"}],"predecessor-version":[{"id":213509,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/213488\/revisions\/213509"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/213489"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=213488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=213488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=213488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}