Skip to content

Commit 4cb5e33

Browse files
Taojunshen3836425+corob-msft@users.noreply.github.comopbld16TylerMSFTTylerMSFT
authored
3/16/2022 AM Publish (#4180)
* Change __STDC__ documentation for 17.2 * Twhitney updateui (#4082) * update ui steps * simplify * fix formatting * try a note * formatting * bridge the note * edits * edits * acrolinx * Update docs/build/walkthrough-header-units.md Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: Shannon Leavitt <V-SHLEAV@microsoft.com> * Fix link to CreateProcess function * Update exception-handling-x64.md * US1907300 - add md code escapes to code elements - PR9 * Address cpp-docs 3691, 3688, 3684, 3664 (MicrosoftDocs#4085) * [17.2p1] Add /scanDependencies option to docs (MicrosoftDocs#4059) * Add /scanDependencies option to docs * Acrolinx pass * Updates per review by Cameron * Consistency of command option formatting * Add IDE instructions * Tweaks per comments. * US1907300 - add md code escapes to code elements - PR7 (MicrosoftDocs#4076) * US1907300 - add md code escapes to code elements - PR7 * US1907300 - add md code escapes to code elements - PR7 * updates after review * updates after review * updates after review * updates after review * updates after review * US1907300 - add md code escapes to code elements - PR8 (MicrosoftDocs#4080) * US1907300 - add md code escapes to code elements - PR8 * updates after review * updates after review * updates after review * fix blocking issue * Address DD 1462641 (MicrosoftDocs#4086) * Content for 17.1 release * US1907300 - add md code escapes to code elements - PR9 * fix formatting issue * US1907300 - add md code escapes to code elements - PR10 * updates after review * updates after review * updates after review * updates after review * updates after review * Address cpp-docs 3694, 3696 * Update what-s-new-for-visual-cpp-in-visual-studio.md fix typo * add links (#4094) Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * Address cpp-docs 3694, 3696 (#4091) * Updates for cpp-docs 3700 3703 * Add op= to example * Add 3448,3482,3483,3540,3683 updates * Use existing media for CMake Targets View * US1907300 - add md code escapes to code elements - PR11 (MicrosoftDocs#4095) * US1907300 - add md code escapes to code elements - PR11 * updates after review * fix table syntax * trying to fix table rendering error * trying to fix table rendering error * trying to fix table rendering error * update after review * Additional clean-up for DD 1462641 * Set ms.topic: faq where YamlMime:FAQ (MicrosoftDocs#4099) * Release notes and conformance for 17.1 * typo fix * Use ConcRT instead of ConCRT ConcRT is a more correct abbreviation for Concurrency Runtime Library. ConcRT also appears in the comment in the beginning of concrt.h. * cpp-docs 3590 in progress * US1907300 - add md code escapes to code elements - PR12 (MicrosoftDocs#4103) * US1907300 - add md code escapes to code elements - PR12 * changes afteer review * changes afteer review * changes afteer review * changes afteer review * Bulk fix: \&MicrosoftDocs#124; entity removal 1/n * Bulk fix: pipe entity removal 2 of n * clarify operators * Bulk fix: Pipe entity 3 of n * Fix grammar * Bulk fix pipe entities 4 of n * Bulk fix * Undo change * Fix pipe entities 5 of n * Fix more pipe entity issues * US1907300 - add md code escapes to code elements - PR13 (MicrosoftDocs#4110) * US1907300 - add md code escapes to code elements - PR13 * changes afteer review * changes after review * Add missing Properties and F1 targets * Tweak dates, Acrolinx * Fix links * US1907300 - add md code escapes to code elements - PR14 * changes after review * US1907300 - add md code escapes to code elements - PR15 * US1907300 - add md code escapes to code elements - PR15 * Add C7553, C5240, diagnostics fixes * Add C5054, C5055, C5056 warnings * fix link * updates after review * Fix a collection of cpp-docs issues * Add C7553, C5240 to TOC * Add C5054, C5055, C5056 to TOC * Tweaks to cpp-docs-220222 * changes after review * Document lowercase, uppercase. Add specific version information * US1907300 - add md code escapes to code elements - PR16 (#4127) * US1907300 - add md code escapes to code elements - PR16 * US1907300 - add md code escapes to code elements - PR16 * changes after review * Add missing documentation to 3 new enum related checks. * Add version inforation into table (#4132) * Fix typo that listed for_each instead of find_if Fixed an example description where the description did not match the example * Add that "g" has been deprecated * US1907300 - add md code escapes to code elements - PR17 (MicrosoftDocs#4130) * US1907300 - add md code escapes to code elements - PR17 * changes after review * changes after review * changes after review * changes after review * changes after review * Change P1689R3 to P1689R4 per Gaby * US1907300 - add md code escapes to code elements - PR18 (MicrosoftDocs#4135) * US1907300 - add md code escapes to code elements - PR18 * changes after review * Update to Docs style. * Fix typo. * Fix missing ending underscore in `_Analysis_assume_` * Fix link. * TC1652913 __declspec(empty_bases) docs * Missed one reference. * Fix typo in _CrtSetReportHook2 parameter name * Add info for TC1587815 JMC in code coverage * Fix typo * US1907300 - add md code escapes to code elements - PR19 (#4141) * US1907300 - add md code escapes to code elements - PR19 * changes after review * Use main branch for public repository * Address bug TS1430759 * update headings * Fix a bunch of "See x for more information" * Bulk Fix 2 of n "see x for more information" * Acrolinx some files before a bulk fix. * Fix remaining "See x" issues in build (#4153) * Fix Acrolinx and grammar issues * Fix typo. * correct previous updates to null * US1907300 - add md code escapes to code elements - PR20 (#4145) * US1907300 - add md code escapes to code elements - PR20 * changes after review * changes after review * changes after review * US1907300 - add md code escapes to code elements - PR21 (#4158) * US1907300 - add md code escapes to code elements - PR21 * changes after review * Update 1 for VS22 (#4147) * Update 1 for VS22 * Disambiguate example, update grammar * Update after review * Update after review * update after review * update after review * update after review * update after review * update after review Co-authored-by: Colin Robertson <corob@microsoft.com> * restored link to videos previously on channel 9 but now on docs.micro… (#4159) * restored link to videos previously on channel 9 but now on docs.microsoft.com shows page * acrolinx * make link relative Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * US1907300 - add md code escapes to code elements - PR22 * changes after review * changes after review * Missing 9 for hexadecimal-digit * Missing " in string-literal * Updating for VS22 (MicrosoftDocs#4139) * Updating for VS22 * Update 2 for VS22 * Update 2 VS22 * Update 2 VS22 * Update 2 VS22 * Update after tech review * Update after review * Update date * US1907300 - add md code escapes to code elements - PR23 (MicrosoftDocs#4165) * US1907300 - add md code escapes to code elements - PR23 * fix table error * fix table error * changes after review * Removed the extra semicolon. * add link to different toolset environment list (MicrosoftDocs#4171) * add link to toolset environment list Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * Fix value constraint for #line * Update for VS2022 (MicrosoftDocs#4162) * Update for VS2022 * Update after review * Update after review * Update after review * Update for VS 2022 * Update for Visual studio 2022 * Update after review * add sample connection properties (#4173) * add sample connection properties * add examples * alphabetize list * break the examples out into their own section * adjust examples * update wording * more changes to example section and remove a little redundancy * acrolinx * tech review * acrolinx * change location of troubleshooting step * wording * removed connection id Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: 3836425+corob-msft@users.noreply.github.com <corob@microsoft.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: Shannon Leavitt <V-SHLEAV@microsoft.com> Co-authored-by: ishchukin <78567572+ishchukin@users.noreply.github.com> Co-authored-by: p4yl0ad <57832389+p4yl0ad@users.noreply.github.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Craig Casey <17149610+craigcaseyMSFT@users.noreply.github.com> Co-authored-by: PRMerger9 <prmrgr9@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: Dennis Rea <v-denrea@microsoft.com> Co-authored-by: jason <drvoss@gmail.com> Co-authored-by: Linda Spiller <93278958+LJSpiller@users.noreply.github.com> Co-authored-by: Alex Buck <abuck@microsoft.com> Co-authored-by: myd7349 <myd7349@gmail.com> Co-authored-by: Kristine Toliver <ktoliver@users.noreply.github.com> Co-authored-by: PRMerger15 <prmrgr15@microsoft.com> Co-authored-by: PRMerger16 <prmrgr16@microsoft.com> Co-authored-by: PRMerger Service account 2 <PRMerger-2@users.noreply.github.com> Co-authored-by: PRMerger12 <prmrgr12@microsoft.com> Co-authored-by: Tamara K <93546702+tamarakhader@users.noreply.github.com> Co-authored-by: PRMerger4 <prmergr4@microsoft.com> Co-authored-by: Daniel Paoliello <danpao@microsoft.com> Co-authored-by: Laura Brenner <90344170+laurabren@users.noreply.github.com> Co-authored-by: Gabor Horvath <gahorvat@microsoft.com> Co-authored-by: Austin C. Minor <austin.chase.m@gmail.com> Co-authored-by: Edward Breeveld <42862235+EddieBreeveld@users.noreply.github.com> Co-authored-by: PRMerger10 <prmrgr10@microsoft.com> Co-authored-by: Miya Natsuhara <46756417+mnatsuhara@users.noreply.github.com> Co-authored-by: PRMerger14 <prmrgr14@microsoft.com> Co-authored-by: adr26 <32688592+adr26@users.noreply.github.com> Co-authored-by: Haig MacGregor <92189915+hmacgregor1@users.noreply.github.com> Co-authored-by: v-pegao <v-pegao@users.noreply.github.com> Co-authored-by: PRMerger18 <prmrgr18@microsoft.com> Co-authored-by: PRMerger8 <prmrgr8@microsoft.com> Co-authored-by: Anna Huff <92125952+AnnaMHuff@users.noreply.github.com> Co-authored-by: Rachana Satao <83084319+rachana-satao@users.noreply.github.com> Co-authored-by: Johnson <skyzs2001@vip.qq.com> Co-authored-by: shrek1402 <44646716+shrek1402@users.noreply.github.com> Co-authored-by: SaltfishAmi <ami@saltfish.moe>
1 parent d220ca4 commit 4cb5e33

2 files changed

Lines changed: 73 additions & 42 deletions

File tree

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

Lines changed: 22 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 Windows Subsystem for Linux from inside a Visual Studio C++ project."
4-
ms.date: "01/8/2021"
4+
ms.date: 03/14/2022
55
---
66
# Connect to your target Linux system in Visual Studio
77

@@ -94,6 +94,8 @@ If `ssh` isn't already set up and running on your Linux system, follow these ste
9494

9595
If you use key files for authentication, make sure the target machine's SSH server is running and configured properly.
9696

97+
If you have trouble connecting to WSL on `localhost`, see [Fix WSL `localhost` connection problems](#fix-wsl-localhost-connection-problems).
98+
9799
::: moniker-end
98100

99101
::: moniker range=">=msvc-160"
@@ -229,6 +231,25 @@ To configure your WSL installation to work with Visual Studio, you need the foll
229231
sudo apt install g++ gdb make ninja-build rsync zip
230232
```
231233

234+
### Fix WSL `localhost` connection problems
235+
236+
When connecting to Windows Subsystem for Linux (WSL) on `localhost`, you may run into a conflict with the Windows `ssh` client on port 22. In WSL, change the port that `ssh`expects requests from to 23 in `/etc/ssh/sshd_config`:
237+
238+
```bash
239+
Port 23
240+
```
241+
242+
If you're connecting using a password, ensure that the following is set in `/etc/ssh/sshd_config`:
243+
244+
```bash
245+
# To disable tunneled clear text passwords, change to no here!
246+
PasswordAuthentication yes
247+
```
248+
249+
After making these changes, restart the SSH server (`sudo service ssh restart` on Ubuntu).
250+
251+
Then retry your connection to `localhost` using port 23.
252+
232253
For more information, see [Download, install, and set up the Linux workload](download-install-and-setup-the-linux-development-workload.md).
233254

234255
To configure an MSBuild project for WSL, see [Configure a Linux project](configure-a-linux-project.md). To configure a CMake project for WSL, see [Configure a Linux CMake project](cmake-linux-project.md). To follow step-by-step instructions for creating a simple console application with WSL, check out this introductory blog post on [C++ with Visual Studio 2019 and the Windows Subsystem for Linux (WSL)](https://devblogs.microsoft.com/cppblog/c-with-visual-studio-2019-and-windows-subsystem-for-linux-wsl/).

docs/linux/connectionmanager-reference.md

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "ConnectionManager reference"
3-
description: "How to manage your remote SSH connections from a command-line tool."
4-
ms.date: "10/7/2020"
3+
description: "How to manage your remote SSH connections from the command-line tool ConnectionManager.exe."
4+
ms.date: 03/14/2022
55
f1_keywords: ["ConnectionManager"]
66
helpviewer_keywords: ["ConnectionManager program"]
77
---
@@ -31,82 +31,82 @@ The functionality of ConnectionManager.exe is also available in Visual Studio. T
3131

3232
Authenticates and adds a new connection. By default, it uses port 22 and password authentication. (You'll be prompted to enter a password.) Use both **-`-password`** and **`--privatekey`** to specify a password for a private key.
3333

34-
- **`remove`** \[*connection_id* \| *user\@host* \[**`--port`** *port*]]
34+
- **`clean`**
35+
36+
Deletes header cache for connections that no longer exist.
37+
38+
- **`help`**
39+
40+
Displays a help screen.
41+
42+
- **`list`** \[**`--properties`**]
43+
44+
Displays information, IDs, and properties of all stored connections.<br>For examples, see [Commonly used properties](#commonly-used-properties).
3545

36-
Removes a connection. If no arguments are specified, you're prompted to specify which connection to remove.
37-
3846
- **`modify`** \[*default* \| *connection_id* \| *user\@host* \[**`--port`** *port*]] \[**`--property`** *key=value*]
3947

4048
Defines or modifies a property on a connection.\
4149
If *value* is empty, then the property *key* is deleted.\
4250
If authentication fails, no changes will be made.\
4351
If no connection is specified (what is meant by *default*, above), the user's default remote connection is used.
4452

45-
- **`remove-all`**
46-
47-
Removes all stored connections.
48-
49-
- **`clean`**
50-
51-
Deletes header cache for connections that no longer exist.
53+
- **`remove`** \[*connection_id* \| *user\@host* \[**`--port`** *port*]]
5254

53-
- **`list`** \[**`--properties`**]
55+
Removes a connection. If no arguments are specified, you're prompted to specify which connection to remove.
5456

55-
Displays information, IDs, and properties of all stored connections.
57+
- **`remove-all`**
5658

57-
- **`help`**
59+
Removes all stored connections.
60+
61+
- **`update`** \[*default* \| *all* \| *connection_id* \| *user\@host* \[**`--port`** *port*]] \[**`--previous`**] [**`--fingerprint`**]
5862

59-
Displays a help screen.
63+
Added in Visual Studio 16.10. Updates the host key fingerprint of the specified connection(s).
6064

6165
- **`version`**
6266

6367
Displays version information.
64-
65-
- **`update`** \[*default* \| *all* \| *connection_id* \| *user\@host* \[**`--port`** *port*]] \[**`--previous`**] [**`--fingerprint`**]
66-
67-
Added in Visual Studio 16.10. Updates the host key fingerprint of the specified connection(s).
6868

6969
### Options
7070

71-
- **`-q`**, **`--quiet`**
71+
- **`--file`** *filename*
7272

73-
Prevents output to `stdout` or `stderr`.
73+
Read connection information from the provided *filename*.
7474

75-
- **`--no-prompt`**
75+
- **`--fingerprint`**
7676

77-
Fail instead of prompt, when appropriate.
77+
The host key fingerprint presented by the server. Use this option with **`list`** to view a connection's fingerprint.
7878

79-
- **`--no-verify`**
79+
- **`-i`**
8080

81-
Add or modify a connection without authentication.
81+
Same as **`--privatekey`**.
8282

83-
- **`--file`** *filename*
83+
- **`-n`**, **`--dry-run`**
8484

85-
Read connection information from the provided *filename*.
85+
Does a dry run of the command.
86+
87+
- **`--no-prompt`**
88+
89+
Fail instead of prompt, when appropriate.
8690

8791
- **`--no-telemetry`**
8892

8993
Disable sending usage data back to Microsoft. Usage data is collected and sent back to Microsoft unless the **`--no-telemetry`** flag is passed.
9094

91-
- **`-n`**, **`--dry-run`**
95+
- **`--no-verify`**
9296

93-
Does a dry run of the command.
97+
Add or modify a connection without authentication.
9498

9599
- **`--p`**
96100

97101
Same as **`--password`**.
98-
99-
- **`-i`**
100-
101-
Same as **`--privatekey`**.
102102

103103
- **`--previous`**
104104

105105
Indicates that the connection(s) will be read from the previous version of connection manager, updated, and written to the new version.
106106

107-
- **`--fingerprint`**
107+
- **`-q`**, **`--quiet`**
108108

109-
The host key fingerprint presented by the server. Use this option with **`list`** to view a connection's fingerprint.
109+
Prevents output to `stdout` or `stderr`.
110110

111111
## Examples
112112

@@ -122,11 +122,21 @@ This command removes the connection that has ID 1975957870 from the list of conn
122122
ConnectionManager.exe remove 1975957870
123123
```
124124

125-
This command overrides the choice of shell for the connection with connection ID 21212121. Supported shells are: **`sh, csh, bash, tcsh, ksh, zsh, dash`**. If the shell found on the Linux system isn't supported, then we fall back to explicitly use **`sh`** for all commands.
126-
127-
```cmd
128-
ConnectionManager.exe modify 21212121 --property shell=csh
129-
```
125+
### Commonly used properties
126+
127+
| Property | Description |
128+
|--|--|
129+
| authentication type | The type of authentication used for the connection such as: `"password"`, `"privatekey"`.<br/>To create a connection with the authentication type set to `"privatekey"`: `ConnectionManager.exe add user@127.0.0.1 --privatekey "%USERPROFILE%\.ssh\id_rsa"`|
130+
| `default` | A boolean indicating whether this is the default connection. The default connection is used when there's more than one connection available and the one to use isn't specified.<br/>To set the specified connection to be the default connection: `ConnectionManager.exe modify -21212121 --property default=true` |
131+
| `host` | The name or IP address of the remote computer.<br/>To change the host for the specified connection to another machine, in this case, local host: `ConnectionManager.exe modify -21212121 --property host=127.0.0.1` |
132+
| `isWsl` | Returns true if the remote session is running Windows Subsystem for Linux. |
133+
| `password` | The password for the connection. Change the password for the specified connection with: `ConnectionManager.exe modify -21212121 --property password="xyz"`|
134+
| `platform` | The platform of the remote computer such as `"ARM"`, `"ARM64"`, `"PPC"`, `"PPC64"`, `"x64"`, `"x86"`.|
135+
| `port` | The port used for the connection.<br/>Change the port for the specified connection: `ConnectionManager.exe modify -21212121 --property port=22`|
136+
| `shell` | The preferred shell to use on the remote system. Supported shells are `sh, csh, bash, tcsh, ksh, zsh, dash`<br/>To set the preferred shell to be zsh for the remote machine on the specified connection: `ConnectionManager.exe modify -21212121 --property shell=zsh`<br/>If the shell found on the Linux system isn't supported, then **`sh`** is used for all commands. |
137+
| `systemID` | The remote system type, such as `"OSX"`, `"Ubuntu"`. |
138+
| `timeout` | The connection timeout in milliseconds. Change the timeout for the specified connection with: `ConnectionManager.exe modify -21212121 --property timeout=100`
139+
| `username` | The name of the user logged into the remote computer.<br/>To add a connection for a user named `"user"` on localhost: `ConnectionManager.exe add user@127.0.0.1`|
130140

131141
## See also
132142

0 commit comments

Comments
 (0)