英文:
Is there a way to open ssh terminal when we are inside Devcontainer in vscode?
问题
我正在连接到安装了Docker的SSH机器。从SSH机器上,我将使用Devcontainer。我大部分时间都在使用Devcontainer。有时候,我需要在SSH终端中运行命令。在这个时候,我会执行'在SSH中重新打开文件夹'并在终端中运行命令。
有没有办法可以同时在SSH中打开一个终端和一个Devcontainer终端?
英文:
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?
答案1
得分: 0
从命令面板 -> 首选项: 打开远程设置 (JSON) (Dev Container) 在 devcontainer 中。我需要添加以下内容:
{
"terminal.integrated.profiles.linux": {
"bash (Host)": {
"path": "ssh",
"icon": "home",
"args": [
"user@host",
],
},
},
}
英文:
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",
],
},
},
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论