{"id":5296,"date":"2019-05-08T13:51:44","date_gmt":"2019-05-08T18:51:44","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=5296"},"modified":"2019-05-25T13:55:24","modified_gmt":"2019-05-25T18:55:24","slug":"did-you-know-you-can-open-files-in-vscode-over-ssh","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=5296","title":{"rendered":"Did you know \u2026 you can open files in VSCode over SSH!?"},"content":{"rendered":"<p><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode-remote.remote-ssh\">The plug-in<\/a> is a preview and you need to use <a href=\"https:\/\/code.visualstudio.com\/insiders\/\">VS Code Insiders<\/a> to install it \u2026 but you can open files and folders directly from a *n?x server via SSH. This is a great way to circumvent Samba quirks (changing the case of a file name, filemode differences between the Samba share and the local files causing all files to be marked as changed, etc) \u2013 and can even eliminate the need to load file sharing servers like Samba in the first place.<\/p>\n<p>Once the plug-in is installed, a \u201cRemote \u2013 SSH\u201d icon appears in the left-hand menu bar. There is a single configuration option for a file containing host definitions. You&#8217;ll want to set up <a href=\"https:\/\/www.rushworth.us\/lisa\/?p=1493\">key-based authentication<\/a> and include the path to the authorized private key in your host config.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"449\" height=\"289\" class=\"wp-image-5297\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/05\/word-image-49.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/05\/word-image-49.png 449w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/05\/word-image-49-300x193.png 300w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/p>\n<p>Right-clicking a host will allow you to open a file or folder within the current VSCode window or launch a new window.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"441\" height=\"440\" class=\"wp-image-5298\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/05\/word-image-50.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/05\/word-image-50.png 441w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/05\/word-image-50-150x150.png 150w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2019\/05\/word-image-50-300x300.png 300w\" sizes=\"auto, (max-width: 441px) 100vw, 441px\" \/><\/p>\n<p>One caveat \u2013 you are running git commands from the context of the remote machine \u2026 this means you\u2019ll need a user name set up <em>there<\/em> or your commits show up with the local logged on username and username@hostname address.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The plug-in is a preview and you need to use VS Code Insiders to install it \u2026 but you can open files and folders directly from a *n?x server via SSH. This is a great way to circumvent Samba quirks (changing the case of a file name, filemode differences between the Samba share and the &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,623],"tags":[777,778],"class_list":["post-5296","post","type-post","status-publish","format-standard","hentry","category-coding","category-containerized-development-and-deployment","tag-development","tag-vs-code"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5296"}],"version-history":[{"count":3,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5296\/revisions"}],"predecessor-version":[{"id":5301,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5296\/revisions\/5301"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}