Common Configuration - Natizyskunk/vscode-sftp GitHub Wiki

name

A string to identify your configuration.

Key Value
name string
{
  "name": "My Server"
}

context

A path relative to the workspace root folder. Use this when you want to map a subfolder to the remotePath.

Key Value Default
context string The workspace root.
{
  "context": "/_subfolder_"
}

protocol

Protocol to be used.

Key Value Default
protocol sftp or ftp sftp
{
  "protocol": "sftp"
}

host

Hostname or IP address of the server.

Key Value
host string
{
  "host": "server.example.com"
}

port

Port number of the server.

Key Value
port integer
{
  "port": 22
}

username

Username for authentication.

Key Value
username string
{
  "username": "user1"
}

password

[!WARNING] Passwords are stored as plain-text!

The password for password-based user authentication.

Key Value
password string
{
  "password": "Password123"
}

remotePath

The absolute path on the remote host.

Key Value Default
remotePath string /
{
  "remotePath": "/_subfolder_"
}

filePerm

Set octal file permissions for new files.

Key Value Default
filePerm number false
{
  "filePerm": 644
}

dirPerm

Set octal directory permissions for new directories.

Key Value Default
dirPerm number false
{
  "dirPerm": 750
}

uploadOnSave

Upload on every save operation of VSCode.

Key Value Default
uploadOnSave boolean false
{
  "uploadOnSave": true
}

useTempFile

Upload temp file on every save operation of VSCode to avoid breaking a webpage when a user accesses it while the file is still being uploaded (is incomplete).

Key Value Default
useTempFile boolean false
{
  "useTempFile": true
}

openSsh

Enable atomic file uploads (only supported by openSSH servers).

💡 Important
If set to true, the useTempFile option must also be set to true.
Key Value Default
openSsh boolean false
{
  "openSsh": true,
  "useTempFile": true
}

downloadOnOpen

Download the file from the remote server whenever it is opened.

Key Value Default
downloadOnOpen boolean false
{
  "downloadOnOpen": true
}

syncOption

Configure the behavior of the Sync command.

Key Value Default
syncOption object {}

syncOption.delete

Delete extraneous files from destination directories.

Key Value
syncOption.delete boolean

syncOption.skipCreate

Skip creating new files on the destination.

Key Value
syncOption.skipCreate boolean

syncOption.ignoreExisting

Skip updating files that exist on the destination.

Key Value
syncOption.ignoreExisting boolean

syncOption.update

Update the destination only if a newer version is on the source filesystem.

Key Value
syncOption.update boolean
{
  "syncOption": {
    "delete": true,
    "skipCreate": false,
    "ignoreExisting": false,
    "update": true
  },
}

ignore

Ignore can be used to ignore files and folders from sync, and even supports wildcards using *. This is the same behavior as gitignore, all paths relative to context of the current configuration.

Key Value Default
ignore string[] []
{
  "ignore": [
    "/.vscode",
    "/.git",
    "/.cache",
    "/_subfolder_",
    ".DS_Store",
    "*.gz",
    "*.log"
  ],
}

ignoreFile

Absolute path to the ignore file or Relative path relative to the workspace root folder.

Key Value
ignoreFile string
{
  "ignoreFile": "/.vscode/sftp.json"
}

watcher

Configure the behavior of the watcher command.

Key Value Default
watcher object {}

watcher.files

Glob patterns that are watched and when edited outside of the VSCode editor are processed.

💡 Important
Set uploadOnSave to false when you watch everything.
Key Value
watcher.files string

watcher.autoUpload

Upload when the file changed.

Key Value
watcher.autoUpload boolean

watcher.autoDelete

Delete when the file is removed.

Key Value
watcher.autoDelete boolean
{
  "watcher": {
    "files": "**/*",
    "autoUpload": true,
    "autoDelete": true
  },
}

remoteTimeOffsetInHours

The number of hours difference between the local machine and the remote server (remote minus local).

Key Value Default
remoteTimeOffsetInHours number 0
{
  "remoteTimeOffsetInHours": 3
}

remoteExplorer

Configure the behavior of the remoteExplorer command.

Key Value Default
remoteExplorer object {}

remoteExplorer.filesExclude

Configure that patterns for excluding files and folders. The Remote Explorer decides which files and folders to show or hide based on this setting..

Key Value
remoteExplorer.filesExclude string[]

remoteExplorer.order

Key Value
remoteExplorer.order number
{
  "remoteExplorer": {
    "filesExclude": [],
    "order": 0
  }
}

concurrency

Lowering the concurrency could get more stability because some clients/servers have some sort of configured/hard coded limit.

Key Value Default
concurrency number 4
{
  "concurrency": 3
}

connectTimeout

The maximum connection time.

Key Value Default
connectTimeout number 10000
{
  "connectTimeout": 15000
}

limitOpenFilesOnRemote

Limit open file descriptors to the specific number in a remote server. Set to true for using default limit(222).

💡 Important
Do not set this unless you have to!
Key Value Default
limitOpenFilesOnRemote mixed false
{
  "limitOpenFilesOnRemote": 15000
}