From 52b45be81e085d1501bc147b848f26ce79e1267b Mon Sep 17 00:00:00 2001 From: Patrick Behr Date: Sun, 23 Jun 2019 15:07:56 -0700 Subject: [PATCH 1/6] initial commit --- README.md | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/README.md b/README.md index a8c251b..6a7b2b8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,74 @@ # setup-vscode How to set up Visual Studio Code locally and connect to remote system + +## Prerequisites +* Get your IBM i credentials from Yoda + +## Installs +Install the following on your Windows computer +* Download & install Git for Windows - https://git-scm.com/download/win +* Download & install Visual Studio Code - https://code.visualstudio.com/download + + +## Set up Visual Studio Code + +Whenever you see %%IBM i Profile%% in the instructions, replace with _your_ *_IBM i_* user profile (replace the % too). +Whenever you see %%Windows Username%% in the instructions, replace with _your_ *_Windows_* user profile (replace the %). +Whenever you see shell commands that you need to enter, they will start with "$". This is the command prompt that you will see in the terminal and are not part of the command; do not type the "$" as part of the commands. + +### Set the default shell +Open Visual Studio Code (obviously) +Press F1 to open the command prompt (displays at the top of the screen) +Type "Terminal: Select Default Shell" in the search bar and press Enter +Select "Git Bash" from the drop-down list + +### Add SSH keys to IBM i +Press "Ctrl+`" to open the terminal inside Visual Studio Code (displays at the bottom of the screen) +-- The "`" should be the key above the Tab key + +Enter the following command to change your current working directory to your home: +`$ cd ~` +`$ pwd` +This should print something like `c/Users/YourWindowsUsername` + +Enter the following command to generate an SSH key: +`$ ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa-ocean-ssh` +Press Enter twice to leave the passphrase blank + +Enter the following command to copy your public key to the OC Skunks IBM i: +`$ ssh-copy-id -i ~/.ssh/id_rsa-ocean-ssh %%IBM i Profile%%@OCSKUNKS.oceanusergroup.org` +When prompted, enter your IBM i password. + +#### Test the SSH connection +Enter the following command to create an SSH connection to the OC Skunks IBM i: +`$ ssh %IBM i User%@OCSKUNKS.oceanusergroup.org -i ~/.ssh/id_rsa-ocean-ssh` +You should see a "bash-4.4$" prompt. +`$ exit` will disconnect the connection. + + +### Download the SSH FS extension +Press Ctrl+Shift+X to open the Extensions pane (or click the icon in left-hand menu) +Type "SSH FS" in the search box +Press Install for SSH FS extension + +Press F1 to open the command prompt +Type "SSH FS: create a SSH FS configuration" and select the link from the drop-down list. +Enter the following configuration: +Name = "ocean_skunks_ssh_fs" +Location = "Global settings.json" +Press Save button + +On the next screen enter the following configuration: +Label = "OCEAN Skunks /home" +Group = "OCEAN" +Host = "OCSKUNKS.oceanusergroup.org" +Root = "/home/%%IBM i Profile%%" +Username = "%%IBM i Profile%%" +Private key = "c:\Users\%%Windows Username%%\.ssh\id_rsa-ocean-ssh" +Press Save button + +Press Ctrl+Shift+E to open the Explorer pane. +Open the SSH FILE SYSTEMS group at the bottom. +Right-Click on OCEAN Skunks /home +Select "Connect as Workspace folder" + From 46e0f54067a0ef953e46e8accf9e3f643f99a978 Mon Sep 17 00:00:00 2001 From: Patrick Behr Date: Sun, 23 Jun 2019 15:30:36 -0700 Subject: [PATCH 2/6] Formatting and grammar changes --- README.md | 90 +++++++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 6a7b2b8..b4a1477 100644 --- a/README.md +++ b/README.md @@ -5,70 +5,70 @@ How to set up Visual Studio Code locally and connect to remote system * Get your IBM i credentials from Yoda ## Installs -Install the following on your Windows computer +Install the following on your Windows computer: * Download & install Git for Windows - https://git-scm.com/download/win * Download & install Visual Studio Code - https://code.visualstudio.com/download ## Set up Visual Studio Code -Whenever you see %%IBM i Profile%% in the instructions, replace with _your_ *_IBM i_* user profile (replace the % too). -Whenever you see %%Windows Username%% in the instructions, replace with _your_ *_Windows_* user profile (replace the %). -Whenever you see shell commands that you need to enter, they will start with "$". This is the command prompt that you will see in the terminal and are not part of the command; do not type the "$" as part of the commands. +When you see %%IBM i Profile%% in the instructions, replace with _your_ **IBM i** user profile (replace the % too). +When you see %%Windows Username%% in the instructions, replace with _your_ **Windows** user name (replace the %). +Whenever you see shell commands that you need to enter, they will start with "$". This is the command prompt that you will see in the terminal and is not part of the command; do not type the "$" as part of the commands! ### Set the default shell -Open Visual Studio Code (obviously) -Press F1 to open the command prompt (displays at the top of the screen) -Type "Terminal: Select Default Shell" in the search bar and press Enter -Select "Git Bash" from the drop-down list +Open Visual Studio Code. +Press F1 to open the command prompt (displays at the top of the screen). +Type "Terminal: Select Default Shell" in the search bar and press Enter. +Select "Git Bash" from the drop-down list. ### Add SSH keys to IBM i -Press "Ctrl+`" to open the terminal inside Visual Studio Code (displays at the bottom of the screen) --- The "`" should be the key above the Tab key +Press Ctrl+\` to open the terminal inside Visual Studio Code (displays at the bottom of the screen). +> The \` should be the key above the Tab key -Enter the following command to change your current working directory to your home: -`$ cd ~` -`$ pwd` -This should print something like `c/Users/YourWindowsUsername` +Enter the following command to change your current working directory to your home: +`$ cd ~` +Print your current working directory with this command: +`$ pwd` +This should print something like `c/Users/YourWindowsUsername` -Enter the following command to generate an SSH key: -`$ ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa-ocean-ssh` -Press Enter twice to leave the passphrase blank +Enter the following command to generate an SSH key: +`$ ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa-ocean-ssh` +Press Enter twice to leave the passphrase blank -Enter the following command to copy your public key to the OC Skunks IBM i: -`$ ssh-copy-id -i ~/.ssh/id_rsa-ocean-ssh %%IBM i Profile%%@OCSKUNKS.oceanusergroup.org` -When prompted, enter your IBM i password. +Enter the following command to copy your public key to the OC Skunks IBM i: +`$ ssh-copy-id -i ~/.ssh/id_rsa-ocean-ssh %%IBM i Profile%%@OCSKUNKS.oceanusergroup.org` +When prompted, enter your IBM i password. #### Test the SSH connection -Enter the following command to create an SSH connection to the OC Skunks IBM i: -`$ ssh %IBM i User%@OCSKUNKS.oceanusergroup.org -i ~/.ssh/id_rsa-ocean-ssh` -You should see a "bash-4.4$" prompt. -`$ exit` will disconnect the connection. +Enter the following command to create an SSH connection to the OC Skunks IBM i: +`$ ssh %%IBM i User%%@OCSKUNKS.oceanusergroup.org -i ~/.ssh/id_rsa-ocean-ssh` +You should see a "bash-4.4$" prompt. +`$ exit` will disconnect the connection. ### Download the SSH FS extension -Press Ctrl+Shift+X to open the Extensions pane (or click the icon in left-hand menu) -Type "SSH FS" in the search box -Press Install for SSH FS extension +Press Ctrl+Shift+X to open the Extensions pane (or click the icon in left-hand menu). +Type "SSH FS" in the search box. +Press Install for SSH FS extension. -Press F1 to open the command prompt -Type "SSH FS: create a SSH FS configuration" and select the link from the drop-down list. +Press F1 to open the command prompt. +Type "SSH FS: create a SSH FS configuration" and select the link from the drop-down list. Enter the following configuration: -Name = "ocean_skunks_ssh_fs" -Location = "Global settings.json" +* Name = "ocean_skunks_ssh_fs" +* Location = "Global settings.json" +Press Save button + +On the next screen enter the following configuration: +* Label = "OCEAN Skunks /home" +* Group = "OCEAN" +* Host = "OCSKUNKS.oceanusergroup.org" +* Root = "/home/%%IBM i Profile%%" +* Username = "%%IBM i Profile%%" +* Private key = "c:\Users\%%Windows Username%%\.ssh\id_rsa-ocean-ssh" Press Save button -On the next screen enter the following configuration: -Label = "OCEAN Skunks /home" -Group = "OCEAN" -Host = "OCSKUNKS.oceanusergroup.org" -Root = "/home/%%IBM i Profile%%" -Username = "%%IBM i Profile%%" -Private key = "c:\Users\%%Windows Username%%\.ssh\id_rsa-ocean-ssh" -Press Save button - -Press Ctrl+Shift+E to open the Explorer pane. -Open the SSH FILE SYSTEMS group at the bottom. -Right-Click on OCEAN Skunks /home -Select "Connect as Workspace folder" - +Press Ctrl+Shift+E to open the Explorer pane. +Open the SSH FILE SYSTEMS group at the bottom. +Right-Click on the "OCEAN Skunks /home" connection. +Select "Connect as Workspace folder". From a97cedb423d24725fddb5b3af8c1552c285259f8 Mon Sep 17 00:00:00 2001 From: Patrick Behr Date: Sun, 23 Jun 2019 15:40:22 -0700 Subject: [PATCH 3/6] Added shell command explanations --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index b4a1477..67e636a 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,17 @@ This should print something like `c/Users/YourWindowsUsername` Enter the following command to generate an SSH key: `$ ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa-ocean-ssh` Press Enter twice to leave the passphrase blank +> `ssh-keygen` is the command to run (generate key) +> `-t rsa` specifies the type of key to create +> `-b 4096` specifies the number of bits in the key +> `-f ~/.ssh/id_rsa-ocean-ssh` specifies the filename of the key Enter the following command to copy your public key to the OC Skunks IBM i: `$ ssh-copy-id -i ~/.ssh/id_rsa-ocean-ssh %%IBM i Profile%%@OCSKUNKS.oceanusergroup.org` When prompted, enter your IBM i password. +> `ssh-copy-id` is the command to run (copy id) +> `-i ~/.ssh/id_rsa-ocean-ssh` specifies the identity file +> `profile@OCSKUNKS.oceanusergroup.org` is the remote server #### Test the SSH connection Enter the following command to create an SSH connection to the OC Skunks IBM i: From 8775c1d7a510b2a08a46f6afc6b0e9e0f6921686 Mon Sep 17 00:00:00 2001 From: p-behr Date: Sun, 23 Jun 2019 15:44:20 -0700 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 67e636a..2032e90 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ This should print something like `c/Users/YourWindowsUsername` Enter the following command to generate an SSH key: `$ ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa-ocean-ssh` Press Enter twice to leave the passphrase blank -> `ssh-keygen` is the command to run (generate key) +> `ssh-keygen` is the command to run (generate key) > `-t rsa` specifies the type of key to create > `-b 4096` specifies the number of bits in the key > `-f ~/.ssh/id_rsa-ocean-ssh` specifies the filename of the key From 6d5ecddad0aa9d9826c9e83e8dc935a6d3dac201 Mon Sep 17 00:00:00 2001 From: p-behr Date: Sun, 23 Jun 2019 15:47:38 -0700 Subject: [PATCH 5/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2032e90..854827d 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Enter the following command to copy your public key to the OC Skunks IBM i: When prompted, enter your IBM i password. > `ssh-copy-id` is the command to run (copy id) > `-i ~/.ssh/id_rsa-ocean-ssh` specifies the identity file -> `profile@OCSKUNKS.oceanusergroup.org` is the remote server +> `profile@OCSKUNKS.oceanusergroup.org` is the user and remote server #### Test the SSH connection Enter the following command to create an SSH connection to the OC Skunks IBM i: From 1147fb9c94f4ee490898886c82f6412a73433312 Mon Sep 17 00:00:00 2001 From: p-behr Date: Sun, 23 Jun 2019 15:52:19 -0700 Subject: [PATCH 6/6] Escape backslashes in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 854827d..603bdc3 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ On the next screen enter the following configuration: * Host = "OCSKUNKS.oceanusergroup.org" * Root = "/home/%%IBM i Profile%%" * Username = "%%IBM i Profile%%" -* Private key = "c:\Users\%%Windows Username%%\.ssh\id_rsa-ocean-ssh" +* Private key = "c:\Users\\%%Windows Username%%\\.ssh\id_rsa-ocean-ssh" Press Save button Press Ctrl+Shift+E to open the Explorer pane.