Skip to content

Commit eb68a41

Browse files
author
mikeblome
committed
added info on creating private key file
1 parent f5cd9fb commit eb68a41

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/linux/connect-to-your-remote-linux-computer.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Connect to your target Linux system in Visual Studio"
33
description: "How to connect to a remote Linux machine or WSL from inside a Visual Studio C++ project."
4-
ms.date: "06/11/2019"
4+
ms.date: "06/19/2019"
55
ms.assetid: 5eeaa683-4e63-4c46-99ef-2d5f294040d4
66
---
77

@@ -23,6 +23,16 @@ When building a C++ Linux project for a remote Linux system (VM or physical mach
2323

2424
To set up this remote connection:
2525

26+
1. Create a private key file. Currently only RSA and DSA keys are supported. You can create a private key file by following these steps:
27+
28+
1. On the Windows machine, create the ssh key pair with `ssh-keygen -t rsa`
29+
30+
1. From Windows, copy the public key to the Linux machine: `scp -p C:\Users\<USERNAME>\.ssh\id_rsa.pub user@hostname`:
31+
32+
1. On the Linux system, add the key to the list of authorized keys (and ensure the file has the correct permissions): `cat ~/id_rsa.pub >> ~/.ssh/authorized_keys; chmod 600 ~/.ssh/authorized_keys`
33+
34+
1. In Visual Studio, add the connection (in Connection Manager). The default private key name is `C:\Users\<USERNAME>\.ssh\id_rsa`.
35+
2636
1. Build the project for the first time or manually create a new entry by selecting **Tools > Options** and then open the **Cross Platform > Connection Manager** node and click the **Add** button.
2737

2838
![Connection Manager](media/settings_connectionmanager.png)
@@ -43,6 +53,7 @@ To set up this remote connection:
4353
| **Private key file** | Private key file created for ssh connection
4454
| **Passphrase** | Passphrase used with private key selected above
4555

56+
4657
1. Click the **Connect** button to attempt a connection to the remote computer.
4758

4859
If the connection succeeds, Visual Studio will begin configuring IntelliSense to use the remote headers. For more information, see [IntelliSense for headers on remote systems](configure-a-linux-project.md#remote_intellisense).

0 commit comments

Comments
 (0)