{"id":1538,"date":"2019-08-07T20:00:06","date_gmt":"2019-08-07T18:00:06","guid":{"rendered":"http:\/\/hen.co.za\/blog\/?p=1538"},"modified":"2019-08-07T20:00:06","modified_gmt":"2019-08-07T18:00:06","slug":"ssh-on-windows-10","status":"publish","type":"post","link":"https:\/\/hen.co.za\/blog\/2019\/08\/ssh-on-windows-10\/","title":{"rendered":"SSH on Windows 10"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I remember that they (Microsoft) mentioned the bash shell on Windows 10 a while ago and other Linux\/Ubuntu integration stuff but at the time it seemed to be just a gimmick. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But since I&#8217;m looking into Nagios and some Windows monitoring I now the need to daily connect to my Nagios server making configuration changes. So far I&#8217;ve been using good old Putty\/WinSCP and it works well. Then I started looking at a way to generate configurations files for some Windows machines and upload them automatically via PowerShell (or it could end up being another tool created in C# eventually). This is how I stumble across the Windows 10 built in SSH functionality &#8211; it&#8217;s been there for at least a year! (since build 1803).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That means you can simply use the ssh command in a Windows command shell (or PowerShell) and send commands to your Linux server. To start it simple open a command prompt (cmd.exe) and run ssh:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"701\" height=\"363\" src=\"https:\/\/hen.co.za\/blog\/wp-content\/uploads\/2019\/08\/Windows-SSH.png\" alt=\"\" class=\"wp-image-1544\" srcset=\"https:\/\/hen.co.za\/blog\/wp-content\/uploads\/2019\/08\/Windows-SSH.png 701w, https:\/\/hen.co.za\/blog\/wp-content\/uploads\/2019\/08\/Windows-SSH-300x155.png 300w\" sizes=\"auto, (max-width: 701px) 100vw, 701px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As can be seen it supports all the basics of any ssh client. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So that cover the basics. The real power comes when you start mixing it with PowerShell and proper scripting and\/or batch files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One very interesting (and incredibly useful) example is something  Scott Hanselman posted &#8211; how to automatically log into a remote linux machine &#8211; see <a href=\"https:\/\/www.hanselman.com\/blog\/HowToUseWindows10sBuiltinOpenSSHToAutomaticallySSHIntoARemoteLinuxMachine.aspx\">this<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I remember that they (Microsoft) mentioned the bash shell on Windows 10 a while ago and other Linux\/Ubuntu integration stuff but at the time it seemed to be just a gimmick. But since I&#8217;m looking into Nagios and some Windows &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/hen.co.za\/blog\/2019\/08\/ssh-on-windows-10\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[267,16],"tags":[310,311,292],"class_list":["post-1538","post","type-post","status-publish","format-standard","hentry","category-administration","category-reference","tag-linux","tag-ssh","tag-windows-10"],"_links":{"self":[{"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/posts\/1538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/comments?post=1538"}],"version-history":[{"count":2,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/posts\/1538\/revisions"}],"predecessor-version":[{"id":1545,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/posts\/1538\/revisions\/1545"}],"wp:attachment":[{"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/media?parent=1538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/categories?post=1538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/tags?post=1538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}