Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent new VS Code window from launching for remote ssh connections

When connecting to a remote machine using VS Code Remote SSH this act always opens a new VS Code Window. Is there a way to change this behavior to use the existing open window? Thanks

like image 322
lordhog Avatar asked May 13 '20 21:05

lordhog


People also ask

How do I turn off remote VS Code?

To close the connection when you finish editing files on the remote host, choose File > Close Remote Connection to disconnect from the host. The default configuration does not include a keyboard shortcut for this command. You can also simply exit VS Code to close the remote connection.

Is VS Code remote SSH safe?

VS Code Remote SSH SSH, or the secure shell protocol, lets you access a remote computer or virtual machine securely over a network connection. You can connect over SSH into another machine from Visual Studio Code and interact with files and folders anywhere on that remote filesystem.

What is remote window in VS Code?

Visual Studio Code Remote Development allows you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment. You can: Develop on the same operating system you deploy to or use larger or more specialized hardware.

How add SSH key to VS Code?

Add SSH key to your VM# Select Use existing public key in the dropdown for SSH public key source so that you can use the public key you just generated. Take the public key and paste it into your VM setup, by copying the entire contents of the id_ed25519. pub in the SSH public key.


1 Answers

There is a separate command for this.

You need to do Remote-SSH: Connect Current Window to Host...

instead of Remote-SSH: Connect to Host...


VSCode screenshot

like image 104
davetapley Avatar answered Oct 12 '22 06:10

davetapley