Configurations are stored in your project working directory under ../.vscode/sftp.json
.
The configuration file can always be accessed with CTRL
+ Shift
+ P
, and searching for SFTP: Config
.

Table of Contents
Configuration
SFTP only configuration
FTP(s) only configuration
Configuration
name
A string to identify your configuration.
{
"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.
{
"host": "server.example.com"
}
port
Port number of the server.
{
"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
},
}
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
}
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
}
SFTP only configuration
agent
Path to ssh-agent's UNIX socket for ssh-agent-based user authentication.
Windows users must set to 'pageant' for authenticating with Pagenat or (actual) path to a Cygwin "UNIX socket".
It'd get more stability because some client/server have some sort of configured/hard coded limit.
{
"agent": "/_subfolder_/agent"
}
privateKeyPath
Absolute path to user private key.
Key |
Value |
privateKeyPath |
string |
{
"privateKeyPath": "/.ssh/key.pem"
}
passphrase
For an encrypted private key, this is the passphrase string used to decrypt it.
Set to 'true' for enable passphrase dialog. This will prevent from using cleartext passphrase in this config.
Key |
Value |
passphrase |
mixed |
{
"passphrase": true
}
interactiveAuth
Enable keyboard interaction authentication mechanism. Set to 'true' to enable verifyCode
dialog.
For example using Google Authentication (multi-factor). Or pass array of predefined phrases to automatically enter them without user prompting.
💡 Note |
Requires the server to have keyboard-interactive authentication enabled. |
Key |
Value |
Default |
interactiveAuth |
boolean|string[] |
'false' |
{
"interactiveAuth": true
}
algorithms
Explicit overrides for the default transport layer algorithms used for the connection.
Default:
{
"algorithms": {
"kex": [
"ecdh-sha2-nistp256",
"ecdh-sha2-nistp384",
"ecdh-sha2-nistp521",
"diffie-hellman-group-exchange-sha256"
],
"cipher": [
"aes128-gcm",
"[email protected]",
"aes256-gcm",
"[email protected]",
"aes128-cbc",
"aes192-cbc",
"aes256-cbc",
"aes128-ctr",
"aes192-ctr",
"aes256-ctr"
],
"serverHostKey": [
"ssh-rsa",
"ssh-dss",
"ssh-ed25519",
"ecdsa-sha2-nistp256",
"ecdsa-sha2-nistp384",
"ecdsa-sha2-nistp521",
"rsa-sha2-512",
"rsa-sha2-256"
],
"hmac": [
"hmac-sha2-256",
"hmac-sha2-512"
]
},
}
sshConfigPath
Absolute path to your SSH configuration file.
Key |
Value |
Default |
sshConfigPath |
string |
~/.ssh/config |
{
"sshConfigPath": "~/.ssh/config"
}
sshCustomParams
Extra parameters appended to the SSH command used by "Open SSH in Terminal".
Key |
Value |
sshCustomParams |
string |
{
"sshCustomParams": "-g"
}
FTP(s) only configuration
secure
Set to true for both control and data connection encryption.
Set to control
for control encryption only, or implicit
for implicitly encrypted control connection (this mode is deprecated in modern times, but usually uses port 990).
Key |
Value |
Default |
secure |
mixed |
false |
{
"secure": control
}
secureOptions
Additional options to be passed to tls.connect()
.
Key |
Value |
secureOptions |
object |
{
"secureOptions": {
"enableTrace": true
}
}