settings

VSCode SFTP Sync

You want to connect to your server but it won’t allow you to install .vscode-server, the port are not open properly or something else ?
Don’t worry, you can access your server in the same fashion with SFT access.

First install SFTP extension on your VSCode

maras it uncategorized image

Then create on your computer a directory to store the settings and it in your VSCode workspace to sync the remote directory you want to connect to.
It is important to note that you need to add the directory as a root directory in your workspace and not adding the parent directory.
if you have sftp > root directory structure and you want to use demo as a sftp directory, make sure to add root and not sftp directory in your workspace, otherwise sftp will be considered the root directory of your sftp synchronization.

click on the demo directory in VSCode and display the command panel with Ctrl+Shift+P to select SFTP: Config, it will create a file in your root directory under ./.vscode/sftp.json, then fill the proper data

maras it uncategorized image

Once you’ve saved your sftp.json file, you will see your sftp access under the sftp extension tab in the left menu, click on the sftp server you want to access which has the same name a the variable name in the sftp.json file, in our case demo, this will prompt for the password to access the server and once connected you should see the list of the remote files.

Modifying those files will download the file in your local directory and update the file according to your specification.

maras it uncategorized image

Enjoy !

logo white maras it

Davask SASU
10 rue Docteur Joseph Audic
56000 Vannes