Skip to content

Instantly share code, notes, and snippets.

@pnminh
Last active May 12, 2020 18:38
Show Gist options
  • Save pnminh/4f33a231aaa2d1d615de68f927e25f5c to your computer and use it in GitHub Desktop.
Save pnminh/4f33a231aaa2d1d615de68f927e25f5c to your computer and use it in GitHub Desktop.

Revisions

  1. pnminh revised this gist May 12, 2020. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions VsCode_SSH_Workspace.md
    Original file line number Diff line number Diff line change
    @@ -12,23 +12,23 @@ Go to extension menu (`Ctrl+Shift+X`)
    ![Extension menu](https://raw.githubusercontent.com/pnminh/vs_code_notes/master/ssh_workspace/media/1_extension_menu.png)

    Search for and select `Remote-SSH` extension from Microsoft (should be the first one from the list)
    ![Search Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/2_search_remote_ssh.png)
    ![Search Remote-SSH](https://raw.githubusercontent.com/pnminh/vs_code_notes/master/ssh_workspace/media/2_search_remote_ssh.png)

    Install the extension
    ![Install Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/3_install_remote_ssh.png)
    ![Install Remote-SSH](https://raw.githubusercontent.com/pnminh/vs_code_notes/master/ssh_workspace/media/3_install_remote_ssh.png)

    Go to `View > Command Pallete (or Ctr+Shift+P)` and search for the command `Remote-SSH: Connect to host...` to run a SSH session or `Remote-SSH: Add New SSH Host` to persist the host configurations for future usage.
    ![Connect Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/4_connect_remote_ssh.png)
    ![Connect Remote-SSH](https://raw.githubusercontent.com/pnminh/vs_code_notes/master/ssh_workspace/media/4_connect_remote_ssh.png)

    Input the hostname and enter. Add password/ssh key location when prompted
    ![Add Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/5_add_host_remote_ssh.png)
    ![Add Remote-SSH](https://raw.githubusercontent.com/pnminh/vs_code_notes/master/ssh_workspace/media/5_add_host_remote_ssh.png)

    After vscode connects successfully to the hostname, we should see the hostname at the bottom left. Also go to `Terminal > New Terminal` will give us the direct ssh session with the host.
    ![Terminal in Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/6_terminal_remote_ssh.png)
    ![Terminal in Remote-SSH](https://raw.githubusercontent.com/pnminh/vs_code_notes/master/ssh_workspace/media/6_terminal_remote_ssh.png)

    We then can have our remote workspace run on the host machine. Select `File > Open Folder (Ctrl+O)` to open the workspace
    ![Open folder in Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/7_open_folder_remote_ssh.png)
    ![Open folder in Remote-SSH](https://raw.githubusercontent.com/pnminh/vs_code_notes/master/ssh_workspace/media/7_open_folder_remote_ssh.png)

    We can also install extensions on the remote workspace such as `yaml` from Red Hat and `kubernetes`
    ![Other extensions in Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/8_other_extensions_remote_ssh.png)
    ![Other extensions in Remote-SSH](https://raw.githubusercontent.com/pnminh/vs_code_notes/master/ssh_workspace/media/8_other_extensions_remote_ssh.png)

  2. pnminh revised this gist May 12, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion VsCode_SSH_Workspace.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ $ sudo dnf install code
    $ code
    ```
    Go to extension menu (`Ctrl+Shift+X`)
    ![Extension menu](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/1_extension_menu.png)
    ![Extension menu](https://raw.githubusercontent.com/pnminh/vs_code_notes/master/ssh_workspace/media/1_extension_menu.png)

    Search for and select `Remote-SSH` extension from Microsoft (should be the first one from the list)
    ![Search Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/2_search_remote_ssh.png)
  3. pnminh revised this gist May 12, 2020. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions VsCode_SSH_Workspace.md
    Original file line number Diff line number Diff line change
    @@ -9,26 +9,26 @@ $ sudo dnf install code
    $ code
    ```
    Go to extension menu (`Ctrl+Shift+X`)
    ![Extension menu](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/1_extension_menu.png)
    ![Extension menu](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/1_extension_menu.png)

    Search for and select `Remote-SSH` extension from Microsoft (should be the first one from the list)
    ![Search Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/2_search_remote_ssh.png)
    ![Search Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/2_search_remote_ssh.png)

    Install the extension
    ![Install Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/3_install_remote_ssh.png)
    ![Install Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/3_install_remote_ssh.png)

    Go to `View > Command Pallete (or Ctr+Shift+P)` and search for the command `Remote-SSH: Connect to host...` to run a SSH session or `Remote-SSH: Add New SSH Host` to persist the host configurations for future usage.
    ![Connect Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/4_connect_remote_ssh.png)
    ![Connect Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/4_connect_remote_ssh.png)

    Input the hostname and enter. Add password/ssh key location when prompted
    ![Add Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/5_add_host_remote_ssh.png)
    ![Add Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/5_add_host_remote_ssh.png)

    After vscode connects successfully to the hostname, we should see the hostname at the bottom left. Also go to `Terminal > New Terminal` will give us the direct ssh session with the host.
    ![Terminal in Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/6_terminal_remote_ssh.png)
    ![Terminal in Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/6_terminal_remote_ssh.png)

    We then can have our remote workspace run on the host machine. Select `File > Open Folder (Ctrl+O)` to open the workspace
    ![Open folder in Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/7_open_folder_remote_ssh.png)
    ![Open folder in Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/7_open_folder_remote_ssh.png)

    We can also install extensions on the remote workspace such as `yaml` from Red Hat and `kubernetes`
    ![Other extensions in Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/8_other_extensions_remote_ssh.png)
    ![Other extensions in Remote-SSH](https://github.com/pnminh/vs_code_notes/raw/master/ssh_workspace/media/8_other_extensions_remote_ssh.png)

  4. pnminh revised this gist May 12, 2020. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions VsCode_SSH_Workspace.md
    Original file line number Diff line number Diff line change
    @@ -9,26 +9,26 @@ $ sudo dnf install code
    $ code
    ```
    Go to extension menu (`Ctrl+Shift+X`)
    ![Extension menu](media/1_extension_menu.png)
    ![Extension menu](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/1_extension_menu.png)

    Search for and select `Remote-SSH` extension from Microsoft (should be the first one from the list)
    ![Search Remote-SSH](media/2_search_remote_ssh.png)
    ![Search Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/2_search_remote_ssh.png)

    Install the extension
    ![Install Remote-SSH](media/3_install_remote_ssh.png)
    ![Install Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/3_install_remote_ssh.png)

    Go to `View > Command Pallete (or Ctr+Shift+P)` and search for the command `Remote-SSH: Connect to host...` to run a SSH session or `Remote-SSH: Add New SSH Host` to persist the host configurations for future usage.
    ![Connect Remote-SSH](media/4_connect_remote_ssh.png)
    ![Connect Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/4_connect_remote_ssh.png)

    Input the hostname and enter. Add password/ssh key location when prompted
    ![Add Remote-SSH](media/5_add_host_remote_ssh.png)
    ![Add Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/5_add_host_remote_ssh.png)

    After vscode connects successfully to the hostname, we should see the hostname at the bottom left. Also go to `Terminal > New Terminal` will give us the direct ssh session with the host.
    ![Terminal in Remote-SSH](media/6_terminal_remote_ssh.png)
    ![Terminal in Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/6_terminal_remote_ssh.png)

    We then can have our remote workspace run on the host machine. Select `File > Open Folder (Ctrl+O)` to open the workspace
    ![Open folder in Remote-SSH](media/7_open_folder_remote_ssh.png)
    ![Open folder in Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/7_open_folder_remote_ssh.png)

    We can also install extensions on the remote workspace such as `yaml` from Red Hat and `kubernetes`
    ![Other extensions in Remote-SSH](media/8_other_extensions_remote_ssh.png)
    ![Other extensions in Remote-SSH](https://github.com/pnminh/vs_code_notes/blob/master/ssh_workspace/media/8_other_extensions_remote_ssh.png)

  5. pnminh created this gist May 12, 2020.
    34 changes: 34 additions & 0 deletions VsCode_SSH_Workspace.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    # SSH Workspace
    ## Install VsCode
    On Fedora/RHEL/CentOS
    ```bash
    $ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
    $ sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
    $ sudo dnf check-update
    $ sudo dnf install code
    $ code
    ```
    Go to extension menu (`Ctrl+Shift+X`)
    ![Extension menu](media/1_extension_menu.png)

    Search for and select `Remote-SSH` extension from Microsoft (should be the first one from the list)
    ![Search Remote-SSH](media/2_search_remote_ssh.png)

    Install the extension
    ![Install Remote-SSH](media/3_install_remote_ssh.png)

    Go to `View > Command Pallete (or Ctr+Shift+P)` and search for the command `Remote-SSH: Connect to host...` to run a SSH session or `Remote-SSH: Add New SSH Host` to persist the host configurations for future usage.
    ![Connect Remote-SSH](media/4_connect_remote_ssh.png)

    Input the hostname and enter. Add password/ssh key location when prompted
    ![Add Remote-SSH](media/5_add_host_remote_ssh.png)

    After vscode connects successfully to the hostname, we should see the hostname at the bottom left. Also go to `Terminal > New Terminal` will give us the direct ssh session with the host.
    ![Terminal in Remote-SSH](media/6_terminal_remote_ssh.png)

    We then can have our remote workspace run on the host machine. Select `File > Open Folder (Ctrl+O)` to open the workspace
    ![Open folder in Remote-SSH](media/7_open_folder_remote_ssh.png)

    We can also install extensions on the remote workspace such as `yaml` from Red Hat and `kubernetes`
    ![Other extensions in Remote-SSH](media/8_other_extensions_remote_ssh.png)