-
-
Notifications
You must be signed in to change notification settings - Fork 92
Configuration
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
.
- name
- context
- protocol
- host
- port
- username
- password
- remotePath
- filePerm
- dirPerm
- uploadOnSave
- useTempFile
- openSsh
- downloadOnOpen
- syncOption
- ignore
- ignoreFile
- watcher
- remoteTimeOffsetInHours
- remoteExplorer
- concurrency
- connectTimeout
- limitOpenFilesOnRemote
A string to identify your configuration.
Key | Value |
---|---|
name | string |
{
"name": "My Server"
}
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 to be used.
Key | Value | Default |
---|---|---|
protocol |
sftp or ftp
|
sftp |
{
"protocol": "sftp"
}
Hostname or IP address of the server.
Key | Value |
---|---|
host | string |
{
"host": "server.example.com"
}
Port number of the server.
Key | Value |
---|---|
port | integer |
{
"port": 22
}
Username for authentication.
Key | Value |
---|---|
username | string |
{
"username": "user1"
}
[!WARNING] Passwords are stored as plain-text!
The password for password-based user authentication.
Key | Value |
---|---|
password | string |
{
"password": "Password123"
}
The absolute path on the remote host.
Key | Value | Default |
---|---|---|
remotePath | string | / |
{
"remotePath": "/_subfolder_"
}
Set octal file permissions for new files.
Key | Value | Default |
---|---|---|
filePerm | number | false |
{
"filePerm": 644
}
Set octal directory permissions for new directories.
Key | Value | Default |
---|---|---|
dirPerm | number | false |
{
"dirPerm": 750
}
Upload on every save operation of VSCode.
Key | Value | Default |
---|---|---|
uploadOnSave | boolean | false |
{
"uploadOnSave": true
}
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
}
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
}
Download the file from the remote server whenever it is opened.
Key | Value | Default |
---|---|---|
downloadOnOpen | boolean | false |
{
"downloadOnOpen": true
}
Configure the behavior of the Sync
command.
Key | Value | Default |
---|---|---|
syncOption | object | {} |
Delete extraneous files from destination directories.
Key | Value |
---|---|
syncOption.delete | boolean |
Skip creating new files on the destination.
Key | Value |
---|---|
syncOption.skipCreate | boolean |
Skip updating files that exist on the destination.
Key | Value |
---|---|
syncOption.ignoreExisting | boolean |
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
},
}
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 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"
],
}
Absolute path to the ignore file or Relative path relative to the workspace root folder.
Key | Value |
---|---|
ignoreFile | string |
{
"ignoreFile": "/.vscode/sftp.json"
}
Configure the behavior of the watcher
command.
Key | Value | Default |
---|---|---|
watcher | object | {} |
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 |
Upload when the file changed.
Key | Value |
---|---|
watcher.autoUpload | boolean |
Delete when the file is removed.
Key | Value |
---|---|
watcher.autoDelete | boolean |
{
"watcher": {
"files": "**/*",
"autoUpload": true,
"autoDelete": true
},
}
The number of hours difference between the local machine and the remote server (remote minus local).
Key | Value | Default |
---|---|---|
remoteTimeOffsetInHours | number | 0 |
{
"remoteTimeOffsetInHours": 3
}
Configure the behavior of the remoteExplorer
command.
Key | Value | Default |
---|---|---|
remoteExplorer | object | {} |
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[] |
Key | Value |
---|---|
remoteExplorer.order | number |
{
"remoteExplorer": {
"filesExclude": [],
"order": 0
}
}
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
}
The maximum connection time.
Key | Value | Default |
---|---|---|
connectTimeout | number | 10000 |
{
"connectTimeout": 15000
}
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
}
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.
Key | Value |
---|---|
agent | string |
{
"agent": "/_subfolder_/agent"
}
Absolute path to user private key.
Key | Value |
---|---|
privateKeyPath | string |
{
"privateKeyPath": "/.ssh/key.pem"
}
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
}
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
}
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"
]
},
}
Absolute path to your SSH configuration file.
Key | Value | Default |
---|---|---|
sshConfigPath | string | ~/.ssh/config |
{
"sshConfigPath": "~/.ssh/config"
}
Extra parameters appended to the SSH command used by "Open SSH in Terminal".
Key | Value |
---|---|
sshCustomParams | string |
{
"sshCustomParams": "-g"
}
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
}
Additional options to be passed to tls.connect()
.
💡 Note |
---|
See TLS connect options callback. |
Key | Value |
---|---|
secureOptions | object |
{
"secureOptions": {
"enableTrace": true
}
}