Choose Ubuntu Server 18.04 LTS for this example, but you can choose recent versions of other Linux distros and look at VS Code's supported SSH servers. Now you can specify details of your VM, such as the name, the size, and the base image. Note: In this tutorial, we are using Azure, but your Linux VM can be hosted anywhere, as long as the Linux distribution meets these prerequisites. From there, you can select your Azure subscription and create a new resource group, if you don't already have one. In the Azure portal, search for "Virtual Machines", and choose Add. If you don't have an existing Linux virtual machine, you can create a new VM through the Azure portal.
AUTOSSH INSTALL FOR MAC CODE
The Remote Status bar item can quickly show you in which context VS Code is running (local or remote) and clicking on the item will bring up the Remote - SSH commands. With the Remote - SSH extension installed, you will see a new Status bar item at the far left. The Remote - SSH extension is used to connect to SSH hosts.
AUTOSSH INSTALL FOR MAC FREE
You’ll have to make sure the LocalUser’s public SSH key has been added to the RemoteUser’s ~/.ssh/authorized_keys file., and you should try an su. If you don’t specify any filename(s) on the command-line, then all the config files are started, and all autossh processes are stopped. The filename can be whatever you like, but shorter filenames are probably best, since you can (optionally) use them on the command-line (for example /etc/init.d/autossh start dbhost1 dbhost2). You would typically have one configuration file per host.
The /etc/autossh/ directory contains the tunnel config file(s). You’ll first need to install autossh - if you’re on an rpm-based distro, you can probably use yum install autossh. I found that the startup scripts available for autossh on the internet were a little too basic for my needs - I wanted autossh to start multiple connections, and to start/stop each one individually if I needed - so I wrote my own. Autossh is a small front-end for SSH that can monitor the connection, and restart the tunnel if it drops or stops responding. The down-side of SSH is that by itself it cannot maintain a persistent connection - network issues may force the tunnel to stop responding, or even drop completely. When an encrypted VPN is not available, the next best solution is usually port-forwarding one or more port(s) through an SSH tunnel.