{"id":875,"date":"2024-02-29T17:20:07","date_gmt":"2024-02-29T17:20:07","guid":{"rendered":"https:\/\/lavenhamit.uk\/wrdprss\/?p=875"},"modified":"2024-03-14T20:14:19","modified_gmt":"2024-03-14T20:14:19","slug":"using-openssh-and-ssh-on-windows","status":"publish","type":"post","link":"https:\/\/lavenhamit.uk\/wrdprss\/?p=875","title":{"rendered":"Using OpenSSH and SSH on Windows"},"content":{"rendered":"\n<p><strong>Secure Shell<\/strong> software  allowing connections between clients and servers for remote administration.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to SSH into Windows from Windows (and copy files remotely)\" width=\"625\" height=\"352\" src=\"https:\/\/www.youtube.com\/embed\/pFTC4Rt-EDQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Related Powershell Commands:<\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Check the installation status<\/mark>\nGet-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'\n\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Start the service<\/mark>\nStart-Service sshd\n\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Change the service startup behaviour<\/mark>\nSet-Service -Name sshd -StartupType 'Automatic'\n\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Add\/Install the service<\/mark>\nAdd-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"SSH Tunneling Explained With Examples\" width=\"625\" height=\"352\" src=\"https:\/\/www.youtube.com\/embed\/n4B8nzUvpFQ?start=149&#038;feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><figcaption class=\"wp-element-caption\">Local Tunneling allows a port on your local client machine to act as a port on the remote server.<br>Jump to remote tunnel at 7m 43 secs<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Useful Commands to show the logged in user account etc:<\/mark>\n\ntasklist \/s &lt;pcname> \/fi \"imagename eq explorer.exe\" \/v\n\nwmic \/node: &lt;pcname> computersystem get username\n\nwmic \/node: &lt;pcname> computersystem get manufacturer, model, username\n\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Or locally:<\/mark>\nwmic computersystem get manufacturer, model, username\n\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Change the Network Hostname (Requires Admin account)\nUsing CMD<\/mark>\nwmic computersystem where name=\"%COMPUTERNAME%\" rename \"NewName\"\n\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Use <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">Powershell<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"> and <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">CMD<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"> to switch between sessions on either command line<\/mark>  \n\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Using Powershell<\/mark>\nRename-Computer \"NewName\" -Restart<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Secure Shell software allowing connections between clients and servers for remote administration.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,23,103],"tags":[],"class_list":["post-875","post","type-post","status-publish","format-standard","hentry","category-general-tips-and-advice","category-utility-software","category-windows-commands"],"_links":{"self":[{"href":"https:\/\/lavenhamit.uk\/wrdprss\/index.php?rest_route=\/wp\/v2\/posts\/875","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lavenhamit.uk\/wrdprss\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lavenhamit.uk\/wrdprss\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lavenhamit.uk\/wrdprss\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lavenhamit.uk\/wrdprss\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=875"}],"version-history":[{"count":9,"href":"https:\/\/lavenhamit.uk\/wrdprss\/index.php?rest_route=\/wp\/v2\/posts\/875\/revisions"}],"predecessor-version":[{"id":893,"href":"https:\/\/lavenhamit.uk\/wrdprss\/index.php?rest_route=\/wp\/v2\/posts\/875\/revisions\/893"}],"wp:attachment":[{"href":"https:\/\/lavenhamit.uk\/wrdprss\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=875"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lavenhamit.uk\/wrdprss\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=875"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lavenhamit.uk\/wrdprss\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}