Search code examples
visual-studio-codesshvscode-devcontainer

Is there a way to open ssh terminal when we are inside Devcontainer in vscode?


I am connecting to ssh machine in which I have installed Docker. From the ssh machine I will use Devcontainer. I am using Devcontainer most of the time. Some time I need to run commands from terminal in ssh. During that time i am doing 'Reopen folder in ssh' and run commands in terminal.

Is there a way that I can open one terminal in SSH and one in Devcontainer at the same time?


Solution

  • How to open local terminal when running VSCode in a Dev Container

    The above post has an answer for this situation.

    From command pallete -> Preferences: Open Remote Settings (JSON) (Dev Container) in devcontainer . I need to add this

    {
        "terminal.integrated.profiles.linux": {
            "bash (Host)": {
                "path": "ssh",
                "icon": "home",
                "args": [
                    "user@host",
                ],
            },
        },
    }