{"id":85,"date":"2023-06-05T12:39:35","date_gmt":"2023-06-05T04:39:35","guid":{"rendered":"http:\/\/pro369.com\/linux\/?p=85"},"modified":"2019-05-21T08:24:34","modified_gmt":"2019-05-21T08:24:34","slug":"vmware%e4%b8%8b%e4%bd%bf%e7%94%a8ssh%e8%a8%aa%e5%95%8flinux%e9%85%8d%e7%bd%ae%e5%af%a6%e7%8f%be","status":"publish","type":"post","link":"https:\/\/por.tw\/linux\/vmware%e4%b8%8b%e4%bd%bf%e7%94%a8ssh%e8%a8%aa%e5%95%8flinux%e9%85%8d%e7%bd%ae%e5%af%a6%e7%8f%be\/","title":{"rendered":"vmware\u4e0b\u4f7f\u7528ssh\u8a2a\u554flinux\u914d\u7f6e\u5be6\u73fe"},"content":{"rendered":"<p><strong>vmware\u4e0b\u4f7f\u7528ssh\u8a2a\u554flinux\u914d\u7f6e\u5be6\u73fe<\/p>\n<p> <font color=\"#FF0000\">linuxcentosssh\u7db2\u8def\u8a2d\u5b9a <\/font><\/p>\n<p> \u5728vmware8\u4e0b\u5b89\u88dd\u4e86centos6.3 \u7528\u4f86\u5b78\u7fd2linux\uff0c\u4f46\u662f\u6bcf\u6b21\u5728\u865b\u64ec\u6a5f\u548c\u5916\u9762\u7684\u7cfb\u7d71\u4e4b\u9593\u5207\u63db\uff0c\u5341\u5206\u9ebb\u7169\uff0c\u800c\u4e14\uff0c\u9810\u8a2dcentos\u5b89\u88dd\u597d\u5f8c\u9810\u8a2d\u662f\u5728x-window\u5716\u5f62\u4ecb\u9762\u958b\u555f\u7684\u66f4\u52a0\u8017\u8cbb\u8cc7\u6e90\uff0c\u65bc\u662f\uff0c\u60f3\u63a1\u7528SecureCRT\u7b49ssh\u5de5\u5177\u4f86\u8a2a\u554f\u3002<\/p>\n<p> \u6d89\u53ca\u5230\u5169\u500b\u554f\u984c\uff1a1\u3001vmware\u4e2dlinux\u7cfb\u7d71\u7684ip\u8a2d\u5b9a 2\u3001\u7cfb\u7d71\u9810\u8a2d\u555f\u52d5level<\/p>\n<p> &nbsp;\u5c0d\u865b\u64ec\u6a5f\u7db2\u8def\u9032\u884c\u8a2d\u5b9a\uff1aEdit -&gt;Virtual Network Editor<\/p>\n<p> \u5982\u4e0b\u5716\uff0c\u9078\u4e2d\u4e00\u500bNAT\u985e\u578b\u7684\u9023\u7dda\uff08\u5982\u679c\u4f60\u6c92\u6709\uff0c\u6211\u5011\u53ef\u4ee5\u65b0\u589e\u4e00\u500b\u9023\u7dda&nbsp; \u9ede\u64ca\u300cAdd Network\u300d&nbsp; \u52a0\u5165\u4e00\u500b\u65b0\u7684NAT\u9023\u7dda\uff0c\u52a0\u5165\u597d\u4e4b\u5f8cApply\uff09\uff0c\u9019\u6642\u5019\u6211\u5011\u5c31\u9032\u884c\u4e0b\u4e00\u6b65\u8b8a\u66f4centos \u9023\u7dda\u4e86\u3002<\/p>\n<p> <\/strong><br \/> <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/visdacom.com\/linux\/wp-content\/uploads\/2013\/04\/4561120970.jpg\"  width=\"182\" height=\"144\" \/><strong><br \/> &nbsp; &nbsp;<\/p>\n<p> &nbsp;&nbsp; VM-&gt;Settings \u5728Network connection\u4e2d \u9078\u53d6custom\u548c\u4e4b\u524d\u8a2d\u5b9a\u7684NAT\u985e\u578b\u9023\u7dda<\/p>\n<p> openssh<\/p>\n<p> <font color=\"#800080\">openssh\u5df2\u7d93\u5b89\u88dd\uff08centos 6.3\uff09<\/font><\/p>\n<p> \u8b8a\u66f4\u914d\u7f6e\u6a94 \/etc\/ssh\/sshd_config<\/p>\n<p> \u78ba\u4fdd<br \/> &nbsp;&nbsp;&nbsp; Port 22<br \/> &nbsp;&nbsp;&nbsp; ListenAddress 0.0.0.0<br \/> &nbsp;&nbsp;&nbsp; Protocol 2<br \/> \u524d\u9762\u7684#\u53bb\u6389\u4e86\uff01<\/p>\n<p> \u6aa2\u8996\u5169\u500b\u7cfb\u7d71ip\u4e26\u6e2c\u8a66 ping<\/p>\n<p> \u6aa2\u8996vmware\u865b\u64ec\u6a5f\u4e2dip\u6211\u5011\u53ef\u4ee5\u4f7f\u7528\u6307\u4ee4<\/p>\n<p> ifconfig<\/p>\n<p> \u6aa2\u8996\u865b\u64ec\u6a5f\u4e2dip<\/p>\n<p> \u53ef\u4ee5\u770b\u5230\u9019\u4e00\u884c\uff1a<\/p>\n<p> &nbsp;inet addr:192.168.174.128&nbsp; Bcast:192.168.174.255&nbsp; Mask:255.255.255.0<\/p>\n<p> int addr:192.168.174.128&nbsp; \u662f\u865b\u64ec\u6a5f\u4e2dip\u4f4d\u5740\uff0c<\/p>\n<p> \u7136\u5f8c\u5c07\u5728win7 cmd \u4e2d\u4f7f\u7528\u6307\u4ee4 ipconfig&nbsp; \u6307\u4ee4\u6aa2\u8996\u672c\u5730\u9023\u7ddaipv4\u4f4d\u5740 \u4f8b\u5982\uff1a169.254.68.68<\/p>\n<p> \u7136\u5f8c\u5c07\u5169\u500bip\u4e92\u76f8ping \u770b\u770b\u80fd\u5426ping\u901a<\/p>\n<p> &nbsp;\u958b\u555fsshd\u670d\u52d9<\/p>\n<p> \u5728centos\u4e2d\u5df2\u7d93\u5b89\u88dd\u4e86sshd \u6240\u4ee5\u53ea\u9700\u8981\u958b\u555f\u670d\u52d9\u5373\u53ef\uff0c<\/p>\n<p> service sshd&nbsp; start<\/p>\n<p> \u8a2d\u5b9a\u958b\u6a5f\u81ea\u555f\u52d5<br \/> chkconfig sshd on<\/p>\n<p> \u91cd\u555f\u670d\u52d9<\/p>\n<p> service sshd&nbsp; restart<\/p>\n<p> \u6aa2\u8996\u670d\u52d9\u662f\u5426\u958b\u555f<\/p>\n<p> ps -le|grep sshd<\/p>\n<p> \u53ef\u4ee5\u986f\u793asshd\u8a0a\u606f \u8aaa\u660e\u670d\u52d9\u4ee5\u53ca\u958b\u555f\u4e86\uff01<\/p>\n<p> <font color=\"#FF00FF\">\u70ba\u4e86\u7bc0\u7701\u8cc7\u6e90\uff1a<\/font><\/p>\n<p> 1.\u958b\u555f\/etc\/inittab \u6a94\u6848:sudo vim inittab<br \/> 2.\u5728\u9810\u8a2d\u7684 run level \u8a2d\u5b9a\u4e2d,\u53ef\u4ee5\u770b\u5230\u7b2c\u4e00\u884c\u66f8\u5beb\u5982:id:5:initdefault:(\u9810\u8a2d\u7684 run level \u7b49\u7d1a\u70ba 5,\u5373\u5716\u5f62<br \/> \u4ecb\u9762)<br \/> 3.\u5c07\u7b2c\u4e00\u884c\u7684 5 \u4fee\u6539\u70ba 3 \u5373\u53ef\u3002<\/p>\n<p> 4.\u5132\u5b58\u6a94\u6848\u5f8c\u91cd\u555f\u7cfb\u7d71\u4f60\u5c31\u53ef\u4ee5\u770b\u898b\u662f\u555f\u52d5\u7684\u6587\u5b57\u4ecb\u9762\u4e86\u3002<\/p>\n<p> <\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>vmware\u4e0b\u4f7f\u7528ssh\u8a2a\u554flinux\u914d\u7f6e\u5be6\u73fe linuxcentosssh\u7db2\u8def\u8a2d\u5b9a \u5728vmware8\u4e0b\u5b89\u88dd\u4e86 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":491,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[20],"class_list":["post-85","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux"],"_links":{"self":[{"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/posts\/85"}],"collection":[{"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":0,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/media\/491"}],"wp:attachment":[{"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/tags?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}