Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>dd-vscode-sshNew to Visual Studio Code? Get it now.
dd-vscode-ssh

dd-vscode-ssh

yezhonghuaer

|
36 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

插件介绍:

  • 自动连接远程服务器
  • 执行脚本

前置工作

在本机执行一下这两两个命令

ssh-keygen -t rsa
ssh-copy-id username@remote_host

以上两个命令是为创建一个私钥和公钥,并将公钥上传到远程服务器上

插件使用方式

在项目的根目录下创建.vscode文件夹,创建ssh.config.json文件 导出格式如下:

{
    "username": "***",
    "host": "***",
    "sh": [
        "cd /",
        "git pull",
        "npm run build:pre"
    ]//预执行脚本
}

演示

QQ20231208-142053-HD.gif

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft