{"id":2288,"date":"2023-03-29T10:05:10","date_gmt":"2023-03-29T02:05:10","guid":{"rendered":"https:\/\/benson.ml\/?p=2288"},"modified":"2023-03-29T10:13:20","modified_gmt":"2023-03-29T02:13:20","slug":"%e4%bd%bf%e7%94%a8-powershell-%e5%ae%89%e8%a3%85-openssh","status":"publish","type":"post","link":"https:\/\/benson80.eu.org\/?p=2288","title":{"rendered":"\u4f7f\u7528 PowerShell \u5b89\u88c5 OpenSSH"},"content":{"rendered":"\n<p>\u82e5\u8981\u4f7f\u7528 PowerShell \u5b89\u88c5 OpenSSH\uff0c\u8bf7\u5148\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c PowerShell\u3002<\/p>\n\n\n\n<p>Get-WindowsCapability -Online | Where-Object Name -like &#8216;OpenSSH*&#8217;<\/p>\n\n\n\n<p>\u5982\u679c\u4e24\u8005\u5747\u5c1a\u672a\u5b89\u88c5\uff0c\u5219\u6b64\u64cd\u4f5c\u5e94\u8fd4\u56de\u4ee5\u4e0b\u8f93\u51fa\uff1a<\/p>\n\n\n\n<p>Name : OpenSSH.Client~~~~0.0.1.0<br>State : NotPresent<\/p>\n\n\n\n<p>Name : OpenSSH.Server~~~~0.0.1.0<br>State : NotPresent<\/p>\n\n\n\n<p>\u7136\u540e\uff0c\u6839\u636e\u9700\u8981\u5b89\u88c5\u670d\u52a1\u5668\u6216\u5ba2\u6237\u7aef\u7ec4\u4ef6\uff1a<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Install the OpenSSH Client<\/h1>\n\n\n\n<p>Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Install the OpenSSH Server<\/h1>\n\n\n\n<p>Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0<\/p>\n\n\n\n<p>\u8fd9\u4e24\u8005\u5e94\u8be5\u90fd\u4f1a\u8fd4\u56de\u4ee5\u4e0b\u8f93\u51fa\uff1a<\/p>\n\n\n\n<p>Path :<br>Online : True<br>RestartNeeded : False<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"818\" height=\"583\" src=\"https:\/\/benson.ml\/wp-content\/uploads\/2023\/03\/image-33.png\" alt=\"\" class=\"wp-image-2292\" srcset=\"https:\/\/benson80.eu.org\/wp-content\/uploads\/2023\/03\/image-33.png 818w, https:\/\/benson80.eu.org\/wp-content\/uploads\/2023\/03\/image-33-300x214.png 300w, https:\/\/benson80.eu.org\/wp-content\/uploads\/2023\/03\/image-33-768x547.png 768w, https:\/\/benson80.eu.org\/wp-content\/uploads\/2023\/03\/image-33-421x300.png 421w\" sizes=\"auto, (max-width: 818px) 100vw, 818px\" \/><\/figure>\n\n\n\n<p>\u8fde\u63a5\u5230 OpenSSH \u670d\u52a1\u5668<\/p>\n\n\n\n<p>ssh username@servername<\/p>\n\n\n\n<p>\u8fde\u63a5\u540e\uff0c\u4f1a\u6536\u5230\u5982\u4e0b\u6240\u793a\u7684\u6d88\u606f\uff1a<\/p>\n\n\n\n<p>The authenticity of host &#8216;servername (10.00.00.001)&#8217; can&#8217;t be established.<br>ECDSA key fingerprint is SHA256:(<a>).<br>Are you sure you want to continue connecting (yes\/no)?<\/a><\/p>\n\n\n\n<p>\u9009\u62e9\u201c\u662f\u201d\u540e\uff0c\u8be5\u670d\u52a1\u5668\u4f1a\u6dfb\u52a0\u5230\u5305\u542b Windows \u5ba2\u6237\u7aef\u4e0a\u7684\u5df2\u77e5 SSH \u4e3b\u673a\u7684\u5217\u8868\u4e2d\u3002<\/p>\n\n\n\n<p>\u7cfb\u7edf\u6b64\u65f6\u4f1a\u63d0\u793a\u4f60\u8f93\u5165\u5bc6\u7801\u3002 \u4f5c\u4e3a\u5b89\u5168\u9884\u9632\u63aa\u65bd\uff0c\u5bc6\u7801\u5728\u952e\u5165\u7684\u8fc7\u7a0b\u4e2d\u4e0d\u4f1a\u663e\u793a\u3002<\/p>\n\n\n\n<p>\u8fde\u63a5\u540e\uff0c\u4f60\u5c06\u770b\u5230 Windows \u547d\u4ee4\u884c\u754c\u9762\u63d0\u793a\u7b26\uff1a<\/p>\n\n\n\n<p>domain\\username@SERVERNAME C:\\Users\\username&gt;<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u82e5\u8981\u4f7f\u7528 PowerShell \u5b89\u88c5 OpenSS &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-2288","post","type-post","status-publish","format-standard","hentry","category-windows"],"_links":{"self":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/2288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2288"}],"version-history":[{"count":5,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/2288\/revisions"}],"predecessor-version":[{"id":2295,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/2288\/revisions\/2295"}],"wp:attachment":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}