I think everyone by now knows the remote plugin for vscode.
If not, you can install it here:
With the Remote - SSH extension installed, you will see a new Status bar item at the far left.
Handy features
Configuration file
If you log in to multiple remote servers or local virtual machines on a regular basis, there’s a better way to connect without having to remember all the usernames, addresses, and additional configuration options.
To use an SSH config file, click on the remote indicator to bring up the remote commands, choose Open Configuration File, and select the file that follows the path “Users/{yourusername}/.ssh/config”.
1# Read more about SSH config files: https://linux.die.net/man/5/ssh_config2Host python-linux-vm3 HostName <vm address>4 User sana5 IdentityFile ~/.ssh/id_python_vm67Host node-vm8 HostName <vm address>9 User sana10 Port 552211 IdentityFile ~/.ssh/id_node_vm
Once you’ve saved the config file, you’ll be able to see those hosts in the Remote Explorer
Proxy
Sometimes you may need to connect from your desktop or laptop to a remote machine over your company’s Intranet or behind a firewall. In this case, you may be using an intermediate server or jump box. This kind of setup is useful if you are working within a secure system that is configured to only accept SSH connections from a fixed set of hosts.
To use a jump-box setup with the Remote - SSH extension, you can use the ProxyCommand config option. This configuration will open a background SSH connection to the jump box, and then connect via a private IP address to the target.
You can set the ProxyCommand config option in the SSH config file like this:
1# Jump box with public IP address2Host jump-box3 HostName 52.179.157.974 User sana5 IdentityFile ~/.ssh/jumpbox67# Target machine with private IP address8Host target-box9 HostName <IP address of target>10 User sana11 IdentityFile ~/.ssh/target12 ProxyCommand ssh -q -W %h:%p jump-box