{"id":146488,"date":"2023-07-07T13:33:57","date_gmt":"2023-07-07T17:33:57","guid":{"rendered":"http:\/\/www.bu.edu\/tech\/?page_id=146488"},"modified":"2024-01-03T10:56:40","modified_gmt":"2024-01-03T15:56:40","slug":"vscode","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/support\/research\/system-usage\/scc-environment\/editors-viewers-and-ides\/vscode\/","title":{"rendered":"VS Code on Login Nodes"},"content":{"rendered":"<h3>VS Code Connect Remotely to a Login Node<\/h3>\n<p><span style=\"font-weight: 400;\">This is our recommended way to remotely connect to a Login node from your local VS Code for code editing and simple tasks. <span style=\"text-decoration: underline;\">Note: Any job that requires more than 15 minutes of CPU time should be executed on a compute node.<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400;\">1. Select the <strong>Extensions<\/strong> icon on the left dashboard <code>[1]<\/code>. Search for the <strong>Remote \u2013 SSH<\/strong> extension <code>[2]<\/code> and select install <code>[3]<\/code>.<\/span><\/p>\n<p><img loading=\"lazy\" src=\"\/tech\/files\/2023\/07\/vscode_remote1-636x438.png\" alt=\"\" width=\"608\" height=\"419\" class=\"wp-image-146419 aligncenter\" srcset=\"https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote1-636x438.png 636w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote1-768x528.png 768w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote1.png 1000w\" sizes=\"(max-width: 608px) 100vw, 608px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">2. Select the new <strong>Remote Explorer<\/strong> icon on the left dashboard <code>[1]<\/code>. In this window you should see <strong>SSH<\/strong>. Click the <strong>+<\/strong><strong> <\/strong>to create a new ssh connection <code>[2]<\/code>.<\/span><\/p>\n<p><img loading=\"lazy\" src=\"\/tech\/files\/2023\/07\/vscode_remote2-636x439.png\" alt=\"\" width=\"636\" height=\"439\" class=\"size-medium wp-image-146420 aligncenter\" srcset=\"https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote2-636x439.png 636w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote2-768x530.png 768w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote2.png 1014w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">3. In the command field that opens at the top, enter the following command with your BU Kerberos username: <code><span class=\"command\">ssh<\/span> <span class=\"placeholder\">USERNAME<\/span>@scc1.bu.edu<\/code>. Hit enter to submit the command <code>[1]<\/code>.<\/span><\/p>\n<p><img loading=\"lazy\" src=\"\/tech\/files\/2023\/07\/vscode_remote3-636x476.png\" alt=\"\" width=\"636\" height=\"476\" class=\"size-medium wp-image-146421 aligncenter\" srcset=\"https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote3-636x476.png 636w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote3-768x575.png 768w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote3.png 822w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">4. The command field will then ask for where to save this .ssh configuration file locally. Hit enter to accept the default location <code>[1]<\/code>. Note: the default location is typically your home directory <code style=\"white-space: nowrap;\">~\/.ssh\/config<\/code>.<\/span><\/p>\n<p><img loading=\"lazy\" src=\"\/tech\/files\/2023\/07\/vscode_remote4-636x475.png\" alt=\"\" width=\"636\" height=\"475\" class=\"size-medium wp-image-146422 aligncenter\" srcset=\"https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote4-636x475.png 636w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote4.png 756w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">5. In the bottom right corner, a <strong>Host Added<\/strong> notification will appear. Select <strong>Connect<\/strong> <code>[1]<\/code>.\u00a0<\/span><\/p>\n<p><img loading=\"lazy\" src=\"\/tech\/files\/2023\/07\/vscode_remote5-636x473.png\" alt=\"\" width=\"636\" height=\"473\" class=\"size-medium wp-image-146423 aligncenter\" srcset=\"https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote5-636x473.png 636w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote5-768x571.png 768w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote5.png 884w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">6. A new window will open with the command field in the top asking for your BU Kerberos password. Enter your password <code>[1]<\/code>. Note: in the bottom left corner, your local VS Code is <strong>Opening Remote&#8230;\u00a0 <\/strong><code>[2]<\/code>.\u00a0<\/span><\/p>\n<p><img loading=\"lazy\" src=\"\/tech\/files\/2023\/07\/vscode_remote6-636x437.png\" alt=\"\" width=\"636\" height=\"437\" class=\"size-medium wp-image-146424 aligncenter\" srcset=\"https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote6-636x437.png 636w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote6-1024x704.png 1024w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote6-768x528.png 768w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote6.png 1164w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">7. The command field will ask to continue to store the generated ssh key. Hit enter to continue <code>[1]<\/code>. Note: in the bottom left corner, your local VS Code is still <strong>Opening Remote\u2026<\/strong>\u00a0<code>[2]<\/code>.<\/span><\/p>\n<p><img loading=\"lazy\" src=\"\/tech\/files\/2023\/07\/Screen-Shot-2023-07-13-at-10.45.47-AM-636x448.png\" alt=\"\" width=\"636\" height=\"448\" class=\"size-medium wp-image-146559 aligncenter\" srcset=\"https:\/\/www.bu.edu\/tech\/files\/2023\/07\/Screen-Shot-2023-07-13-at-10.45.47-AM-636x448.png 636w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/Screen-Shot-2023-07-13-at-10.45.47-AM-1024x721.png 1024w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/Screen-Shot-2023-07-13-at-10.45.47-AM-768x541.png 768w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/Screen-Shot-2023-07-13-at-10.45.47-AM.png 1318w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>8. <span style=\"font-weight: 400;\">The command field will now ask you to use DUO two-factor. Enter \u201c1\u201d into the text box and hit enter to receive a request via the DUO App <code>[1]<\/code>. Note: in the bottom left corner, your local VS Code is still <strong>Opening Remote\u2026<\/strong>\u00a0<code>[2]<\/code>.<\/span><\/p>\n<p><img loading=\"lazy\" src=\"\/tech\/files\/2023\/07\/Screen-Shot-2023-07-13-at-10.47.01-AM-636x445.png\" alt=\"\" width=\"636\" height=\"445\" class=\"size-medium wp-image-146560 aligncenter\" srcset=\"https:\/\/www.bu.edu\/tech\/files\/2023\/07\/Screen-Shot-2023-07-13-at-10.47.01-AM-636x445.png 636w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/Screen-Shot-2023-07-13-at-10.47.01-AM-1024x716.png 1024w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/Screen-Shot-2023-07-13-at-10.47.01-AM-768x537.png 768w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/Screen-Shot-2023-07-13-at-10.47.01-AM.png 1322w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">9. You should now be connected, and in the future can activate this ssh connection via the <strong>Remote Explorer<\/strong>. Note: in the bottom left corner, your local VS Code is connected to a Login node <strong>SSH scc1.bu.edu<\/strong><strong>\u00a0<\/strong><code>[1]<\/code>.\u00a0<\/span><\/p>\n<p><img loading=\"lazy\" src=\"\/tech\/files\/2023\/07\/vscode_remote7-636x441.png\" alt=\"\" width=\"636\" height=\"441\" class=\"size-medium wp-image-146425 aligncenter\" srcset=\"https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote7-636x441.png 636w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote7-1024x710.png 1024w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote7-768x532.png 768w, https:\/\/www.bu.edu\/tech\/files\/2023\/07\/vscode_remote7.png 1153w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>VS Code Connect Remotely to a Login Node This is our recommended way to remotely connect to a Login node from your local VS Code for code editing and simple tasks. Note: Any job that requires more than 15 minutes of CPU time should be executed on a compute node. 1. Select the Extensions icon&#8230;<\/p>\n","protected":false},"author":1692,"featured_media":0,"parent":137931,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/146488"}],"collection":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/users\/1692"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/comments?post=146488"}],"version-history":[{"count":17,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/146488\/revisions"}],"predecessor-version":[{"id":146863,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/146488\/revisions\/146863"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137931"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=146488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}