H ow do I create and setup an OpenSSH config file to create shortcuts for servers I frequently access under Linux or Unix desktop operating systems? A global or local configuration file for SSH client can create shortcuts for sshd server including advanced ssh client options.

The Remote Development extension pack allows you to open any folder in a container, on a remote machine, or in the Windows Subsystem for Linux (WSL) and take advantage of VS Code's full feature set. Since this lets you set up a full-time development environment anywhere, you can:

  • Develop on the same operating system you deploy to or use larger, faster, or more specialized hardware than your local machine.
  • Quickly swap between different, isolated development environments and safely make updates without worrying about impacting your local machine.
  • Help new team members / contributors get productive quickly with easily spun up, consistent development containers.
  • Take advantage of a Linux based tool-chain right from the comfort of Windows from a full-featured development tool.
  1. Bitvise SSH Client. Bitvise SSH Client is an SSH and SFTP client for Windows. It is developed and supported professionally by Bitvise. The SSH Client is robust, easy to install, easy to use, and supports all features supported by PuTTY, as well as the following: graphical SFTP file transfer; single-click Remote Desktop tunneling.
  2. Start by selecting Remote-SSH: Add New SSH Host. From the Command Palette (F1) or clicking on the Add New icon in the SSH Remote Explorer in the Activity Bar. You'll then be asked to enter the SSH connection information.

No source code needs to be on your local machine to gain these benefits since Remote Development runs commands and extensions directly on the remote machine.

File

This Remote Development extension pack includes three extensions:

  • Remote - SSH - Work with source code in any location by opening folders on a remote machine/VM using SSH. Supports x86_64, ARMv7l (AArch32), and ARMv8l (AArch64) glibc-based Linux, Windows 10/Server (1803+), and macOS 10.14+ (Mojave) SSH hosts.
  • Remote - Containers - Work with a sandboxed toolchain or container based application by opening any folder mounted into or inside a container.
  • Remote - WSL - Get a Linux-powered development experience from the comfort of Windows by opening any folder in the Windows Subsystem for Linux.

The Remote SSH extension at work:

System Requirements

Local: See the minimum requirements for VS Code. Windows support in Remote - Containers requires Windows 10 Professional or Enterprise is due to the requirements of Docker Desktop. See installation steps for additional details.

Remote host / container / WSL support:

  • x86_64 / ARMv8l (AArch64) / ARM7l (AArch32) Debian/Raspbian 9+, Ubuntu 16.04+, Ubuntu IoT 18.04+, CentOS / RHEL 7+ SSH hosts, containers, or WSL distributions.
  • x86_64 Alpine Linux 3.7+ containers or WSL distributions (no SSH support yet).

Additional SSH support:

  • Windows 10 / Server 2016/2019 (1803+) using the official OpenSSH Server.
  • macOS 10.14+ (Mojave) SSH hosts with Remote Login enabled.

Other glibc based Linux SSH Hosts, containers, or WSL distributions may work if they have needed prerequisites.

Some extensions installed on ARMv7l (AArch32) and ARMv8l (AArch64) devices may not work due to the use of x86 native code in the extension. Similarly, extensions installed in Alpine Linux containers or the Alpine WSL distribution may not work due to glibc dependencies in native code inside the extension. See the Remote Development and Linux article for details.

Installation

  1. Install VS Code or VS Code Insiders and this extension pack. On Windows, be sure to check Add to PATH when asked to Select Additional Tasks during installation.

  2. Remote - SSH: Install an OpenSSH compatible SSH client.

  3. Remote - WSL: Install the Windows Subsystem for Linux along with your preferred Linux distribution. (Note that WSL2 support is experimental.)

  4. Remote - Containers: Install and configure Docker for your operating system.

    Windows / macOS:

    1. Install Docker Desktop 2.0+ for Mac/Windows. (Docker Toolbox is not supported, but Docker does not need to be running if you use a remote host.)
    2. Right-click on the Docker task bar item and update Settings / Preferences > Shared Drives / File Sharing with any source code locations you want to open in a container. See tips and tricks for details.

    Linux:

    1. Follow the official install instructions for Docker CE/EE 18.06+. If you use Docker Compose, follow the Docker Compose 1.21+ install directions.
    2. Add your user to the docker group by using a terminal to run: sudo usermod -aG docker $USER Sign out and back in again so this setting takes effect.

Working with Git? Here are three tips to consider:

File Sshd_config Is Unwritable

  • If you are working with the same repository folder in Windows and WSL or a container, be sure to set up consistent line endings. See tips and tricks to learn how.
  • In WSL, you can also avoid passwords by configuring WSL to use the Windows Git credential manager. See tips and tricks to for details.
  • For containers, if you clone using a Git credential manager, your container should already have access to your credentials! If you use SSH keys, you can also opt-in to sharing them. See Sharing Git credentials with your container for details.

Getting started

File Ssh

Check out one of the following quick starts to get going.

Available commands

Another way to learn what you can do with the Remote Development extensions is to browse the commands each of them provide. Press F1 to bring up the Command Palette and type in Remote- for a full list of commands.

You can also click on the Remote 'Quick Access' status bar item in the lower left corner to get a list of the most common commands.

For more information, please see the extension pack documentation.

Questions, Feedback, Contributing

Have a question or feedback?

  • See the documentation or the troubleshooting guide.
  • Up-vote a feature or request a new one, search existing issues, or report a problem.
  • Contribute a development container definition for others to use
  • Contribute to our documentation
  • ...and more. See our CONTRIBUTING guide for details.

Or connect with the community...

Telemetry

The Visual Studio Code Remote Development extension pack and its related extensions collect telemetry data to help us build a better experience working remotely from VS Code. We only collect data on which commands are executed. We do not collect any information about image names, paths, etc. The extension respects the telemetry.enableTelemetry setting which you can learn more about in the Visual Studio Code FAQ.

License

By downloading and using the Visual Studio Remote Development extension pack and its related components, you agree to the product license terms and privacy statement.

How to install the PuTTy Secure Copy client and use it to transfer files

PuTTY is the CIT-recommended application for secure file transfer using SCP between Windows clients and Windows or Unix servers. Its secure copy utility is called PuTTy Secure Copy Protocol (PSCP).

PSCP and PuTTY are available from PuTTY.org.

Install PuTTY SCP (PSCP)

PSCP is a tool for transferring files securely between computers using an SSH connection. To use this utility, you should be comfortable working in the Windows Command Prompt.

File SshFile ssh command
  1. Download the PSCP utility from PuTTy.org by clicking the file name link and saving it to your computer. (If you also want to use the PuTTY shell program, you can download and save putty.exe to your computer as well.)
  2. The PuTTY SCP (PSCP) client does not require installation in Windows, but runs directly from a Command Prompt window. Move the client program file to a convenient location in your Programs folders and make a note of the location.
  3. To open a Command Prompt window, from the Start menu, click Run.

In Windows 10, open the Start menu and type cmd. Click the Command Prompt search result item that appears.
File
  1. A Command Prompt window will open. To be sure the utility launches correctly from any directory in the Command Prompt window, set up an environment path so your system knows where to look for it. You'll use the pscp.exe location that you made note of in Step 2. For example, if you've saved the pscp.exe file to the folder 'C:Program FilesPuTTy', set up a path by entering set PATH='%PATH%;%ProgramFiles%putty' at the prompt in the Command Prompt window.
  2. Entering the path in this way only lasts for the duration of the current session (that is, while you have the Command Prompt window open). To set up an environment variable path permanently, open the System control panel in Windows and click Advanced system settings, then click Environment Variables. In the Environment Variables window, select Path from the list of User variables, then click Edit. (If no Path variable is listed, click New.)
  3. In the Edit User Variable window, click New. Type or paste the directory path for the PSCP utility you noted in Step 2 (for example, C:/Program Files/putty) into the empty highlighted new line item.
  4. Click OK to save the new entry, then click OK again to close the Environment Variables window. The PSCP program file location is set up in your system and will not need to be entered each time you open a Command Prompt window.

File-sharing Software

Many users will not have sufficient administrative privileges to add or edit the Path environment variable permanently in their Windows System settings. In this case, contact the IT Service Desk for assistance in setting up PSCP, PuTTy, and Windows environment path variables.

File Sharing

Transfer files using PSCP

  1. Open the Command Prompt window, and if necessary set up your path variable as shown above in Step 4.

  2. To copy the local file c:documentsinfo.txt as user username to the server server.example.com with destination directory /tmp/foo, type at the prompt:
    pscp c:documentsinfo.txt userid@server.example.com:/tmp/foo/info.txt

  3. When prompted, enter your password for the server.

File Share Manager

Review thecomplete documentation for PSCP and PuTTY on the PuTTY.org site.