Skip to content

Commit

Permalink
Added example chmod commands for folders/files
Browse files Browse the repository at this point in the history
  • Loading branch information
pbehr-cambro committed Jun 24, 2019
1 parent 1147fb9 commit ce0f2bb
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ 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
## Setting up SSH

### Generate local SSH 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
Expand All @@ -40,21 +42,24 @@ Press Enter twice to leave the passphrase blank
> `-b 4096` specifies the number of bits in the key
> `-f ~/.ssh/id_rsa-ocean-ssh` specifies the filename of the key
### Copy your public SSH key to IBM i
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
> `[email protected]` is the user and remote server
#### Test the SSH connection
### 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
## Editing remote source files

### Download/Configure 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.
Expand All @@ -75,7 +80,17 @@ On the next screen enter the following configuration:
* Private key = "c:\Users\\%%Windows Username%%\\.ssh\id_rsa-ocean-ssh"
Press Save button

### Open/Edit remote files
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".


## Troubleshooting
If you are having issues (i.e. SSH is still asking for a password) check the file permissions:
chmod 755 ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/authorized_keys

0 comments on commit ce0f2bb

Please sign in to comment.