如何用VsCode编写sh脚本自动到linux上

如何用VsCode编写sh脚本自动到linux上

VsCode 下载插件sftp

快捷键 Ctrl + Shift + P

搜索 sftp , 选择 sftp config, 并做如下配置

{
    "name": "node1",
    "host": "192.168.114.133",
    "protocol": "sftp",
    "port": 22,
    "username": "root",
    "password": "halouworld",
    "remotePath": "/root/sh",
    "interactiveAuth": false,
    "uploadOnSave": true
}

工程文件夹下右键

选择 Sync Local -> Remote , 如果配置正确, 插件会自动同步最新的脚本到 Linux

posted on 2022-07-26 16:43  指尖,写不尽  阅读(412)  评论(0编辑  收藏  举报

导航