VSCode = Visual Studio Code 에서 사용할 수 있는 확장(Extension) 입니다.


ftp/sftp 동기화 확장입니다.


링크 : https://marketplace.visualstudio.com/items?itemName=liximomo.sftp




매우 강력하고 스마트한 기능. 매우 간단하고, 세 줄의 설정 만 필요합니다! 매우 빠르며 눈 깜짝할 사이 끝납니다.


  • 원격 탐색기로 원격 브라우저
  • 로컬 및 원격 비교
  • 디렉토리 동기화
  • 업로드 / 다운로드
  • 저장시 업로드
  • 파일 감시자
  • 다중 구성
  • 전환 가능한 프로필


{
  "host": "host",
  "username": "username",
  "remotePath": "/remote/workspace"
}
{
  "username": "username",
  "password": "password",
  "remotePath": "/remote/workspace/a",
  "watcher": {
    "files": "dist/*.{js,css}",
    "autoUpload": false,
    "autoDelete": false
  },
  "profiles": {
    "dev": {
      "host": "dev-host",
      "remotePath": "/dev",
      "uploadOnSave": true
    },
    "prod": {
      "host": "prod-host",
      "remotePath": "/prod"
    }
  },
  "defaultProfile": "dev"
}

Note: context and watcher are only avaliable at root level.

Use SFTP: Set Profile to swtich profile.

[
  {
    "name": "server1",
    "context": "/project/build",
    "host": "host",
    "username": "username",
    "password": "password",
    "remotePath": "/remote/project/build"
  },
  {
    "name": "server2",
    "context": "/project/src",
    "host": "host",
    "username": "username",
    "password": "password",
    "remotePath": "/remote/project/src"
  }
]

Note: name is required in this mode.

You can connection to a target server through a proxy with ssh protocol.

Note: Variable substitution is not working in a hop config.

local -> hop -> target

{
  "name": "target",
  "host": "targetHost",
  "username": "targetUsername",
  "privateKeyPath": "~/.ssh/id_rsa",
  "remotePath": "/path/in/target",
  "hop": {
    "host": "hopHost",
    "username": "hopUsername",
    "privateKeyPath": "/Users/hopUsername/.ssh/id_rsa" // The key file is assumed on the hop.
  }
}

local -> hopA -> hopB -> target

{
  "name": "target",
  "host": "targetHost",
  "username": "targetUsername",
  "privateKeyPath": "~/.ssh/id_rsa",
  "remotePath": "/path/in/target",
  "hop": [
    {
      "host": "hopAHost",
      "username": "hopAUsername",
      "privateKeyPath": "/Users/hopAUsername/.ssh/id_rsa"
    },
    {
      "host": "hopBHost",
      "username": "hopBUsername",
      "privateKeyPath": "/Users/hopBUsername/.ssh/id_rsa"
    }
  ]
}

You can use remote to tell sftp to get the config from remote-fs.

In User Setting:

"remotefs.remote": {
  "dev": {
    "scheme": "sftp",
    "host": "host",
    "username": "username",
    "rootPath": "/path/to/somewhere"
  },
  "projectX": {
    "scheme": "sftp",
    "host": "host",
    "username": "username",
    "privateKeyPath": "/Users/xx/.ssh/id_rsa",
    "rootPath": "/home/foo/some/projectx"
  }
}

In sftp.json:

{
  "remote": "dev",
  "remotePath": "/home/xx/",
  "uploadOnSave": true,
  "ignore": [".vscode", ".git", ".DS_Store"]
}




자세한 설정 및 명령어는 WIKI ( https://github.com/liximomo/vscode-sftp/wiki ) 를 참고하세요.

+ Recent posts