Visual Studio Remote Desktop



Browse other questions tagged c# visual-studio remote-desktop terminal-services or ask your own question. The Overflow Blog Understanding quantum computing through drunken walks. Podcast 330: How to build and maintain online communities, from gaming to Featured on Meta. C# visual-studio remote-access remote-desktop. Asked Mar 23 at 19:32. 1 1 1 bronze badge. 0answers 21 views SikuliLibrary - Robot Framework Don't Input Text or Paste Text on Textbox via Remote Desktop Connection. I want that my script will automate to remote desktop connection. My problem is how will I able to send text in a.

-->

Important

Azure Cloud Services (extended support) is a new Azure Resource Manager based deployment model for the Azure Cloud Services product. With this change, Azure Cloud Services running on the Azure Service Manager based deployment model have been renamed as Cloud Services (classic) and all new deployments should use Cloud Services (extended support).

Visual Studio Remote Desktop

Remote Desktop enables you to access the desktop of a role running in Azure. You can use a Remote Desktop connection to troubleshoot and diagnose problems with your application while it is running.

The publish wizard that Visual Studio provides for cloud services includes an option to enable Remote Desktop during the publishing process, using credentials that you provide. Using this option is suitable when using Visual Studio 2017 version 15.4 and earlier.

With Visual Studio 2017 version 15.5 and later, however, it's recommended that you avoid enabling Remote Desktop through the publish wizard unless you're working only as a single developer. For any situation in which the project might be opened by other developers, you instead enable Remote Desktop through the Azure portal, through PowerShell, or from a release pipeline in a continuous deployment workflow. This recommendation is due to a change in how Visual Studio communicates with Remote Desktop on the cloud service VM, as is explained in this article.

Configure Remote Desktop through Visual Studio 2017 version 15.4 and earlier

When using Visual Studio 2017 version 15.4 and earlier, you can use the Enable Remote Desktop for all roles option in the publish wizard. You can still use the wizard with Visual Studio 2017 version 15.5 and later, but don't use the Remote Desktop option.

  1. In Visual Studio, start the publish wizard by right-clicking your cloud service project in Solution Explorer and choosing Publish.

  2. Sign into your Azure subscription if needed and select Next.

  3. On the Settings page, select Enable Remote Desktop for all roles, then select the Settings... link to open the Remote Desktop Configuration dialog box.

  4. At the bottom of the dialog box, select More Options. This command displays a drop-down list in which you create or choose a certificate so that you can encrypt credentials information when connecting via remote desktop.

    Note

    The certificates that you need for a remote desktop connection are different from the certificates that you use for other Azure operations. The remote access certificate must have a private key.

  5. Select a certificate from the list or choose <Create...>. If creating a new certificate, provide a friendly name for the new certificate when prompted and select OK. The new certificate appears in the drop-down list box.

  6. Provide a user name and a password. You can’t use an existing account. Don’t use 'Administrator' as the user name for the new account.

  7. Choose a date on which the account will expire and after which Remote Desktop connections will be blocked.

  8. After you've provided all the required information, select OK. Visual Studio adds the Remote Desktop settings to your project's .cscfg and .csdef files, including the password that's encrypted using the chosen certificate.

  9. Complete any remaining steps using the Next button, then select Publish when you’re ready to publish your cloud service. If you're not ready to publish, select Cancel and answer Yes when prompted to save changes. You can publish your cloud service later with these settings.

Configure Remote Desktop when using Visual Studio 2017 version 15.5 and later

With Visual Studio 2017 version 15.5 and later, you can still use the publish wizard with a cloud service project. You can also use the Enable Remote Desktop for all roles option if you're working only as a single developer.

If you're working as part of a team, you should instead enable remote desktop on the Azure cloud service by using either the Azure portal or PowerShell.

This recommendation is due to a change in how Visual Studio 2017 version 15.5 and later communicates with the cloud service VM. When enabling Remote Desktop through the publish wizard, earlier versions of Visual Studio communicate with the VM through what's called the 'RDP plugin.' Visual Studio 2017 version 15.5 and later communicates instead using the 'RDP extension' that is more secure and more flexible. This change also aligns with the fact that the Azure portal and PowerShell methods to enable Remote Desktop also use the RDP extension.

When Visual Studio communicates with the RDP extension, it transmit a plain text password over TLS. However, the project's configuration files store only an encrypted password, which can be decrypted into plain text only with the local certificate that was originally used to encrypt it.

If you deploy the cloud service project from the same development computer each time, then that local certificate is available. In this case, you can still use the Enable Remote Desktop for all roles option in the publish wizard.

If you or other developers want to deploy the cloud service project from different computers, however, then those other computers won't have the necessary certificate to decrypt the password. As a result, you see the following error message:

You could change the password every time you deploy the cloud service, but that action becomes inconvenient for everyone who needs to use Remote Desktop.

If you're sharing the project with a team, then, it's best to clear the option in the publish wizard and instead enable Remote Desktop directly through the Azure portal or by using PowerShell.

Deploying from a build server with Visual Studio 2017 version 15.5 and later

You can deploy a cloud service project from a build server (for example, with Azure DevOps Services) on which Visual Studio 2017 version 15.5 or later is installed in the build agent. With this arrangement, deployment happens from the same computer on which the encryption certificate is available.

To use the RDP extension from Azure DevOps Services, include the following details in your build pipeline:

  1. Include /p:ForceRDPExtensionOverPlugin=true in your MSBuild arguments to make sure the deployment works with the RDP extension rather than the RDP plugin. For example:

  2. After your build steps, add the Azure Cloud Service Deployment step and set its properties.

  3. After the deployment step, add an Azure Powershell step, set its Display name property to 'Azure Deployment: Enable RDP Extension' (or another suitable name), and select your appropriate Azure subscription.

  4. Set Script Type to 'Inline' and paste the code below into the Inline Script field. (You can also create a .ps1 file in your project with this script, set Script Type to 'Script File Path', and set Script Path to point to the file.)

Connect to an Azure Role by using Remote Desktop

After you publish your cloud service on Azure and have enabled Remote Desktop, you can use Visual Studio Server Explorer to log into the cloud service VM:

  1. In Server Explorer, expand the Azure node, and then expand the node for a cloud service and one of its roles to display a list of instances.

  2. Right-click an instance node and select Connect Using Remote Desktop.

  3. Enter the user name and password that you created previously. You are now logged into your remote session.

Additional resources

The Remote - SSH extension lets you use any remote machine with a SSH server as your development environment. This can greatly simplify development and troubleshooting in a wide variety of situations. You can:

  • Develop on the same operating system you deploy to or use larger, faster, or more specialized hardware than your local machine.
  • Quickly swap between different, remote development environments and safely make updates without worrying about impacting your local machine.
  • Access an existing development environment from multiple machines or locations.
  • Debug an application running somewhere else such as a customer site or in the cloud.

No source code needs to be on your local machine to gain these benefits since the extension runs commands and other extensions directly on the remote machine. You can open any folder on the remote machine and work with it just as you would if the folder were on your own machine.

SSH Host Requirements

You can connect to a running SSH server on the following platforms.

Supported:

  • x86_64 Debian 8+, Ubuntu 16.04+, CentOS / RHEL 7+ Linux.
  • ARMv7l (AArch32) Raspbian Stretch/9+ (32-bit).
  • ARMv8l (AArch64) Ubuntu 18.04+ (64-bit).
  • Windows 10 / Server 2016/2019 (1803+) using the official OpenSSH Server.
  • macOS 10.14+ (Mojave) SSH hosts with Remote Login enabled.

Visual Studio Remote Desktop Download

Other glibc based Linux distributions for x86_64, ARMv7l (AArch32), and ARMv8l (AArch64) should work if they have the needed prerequisites. See the Remote Development with Linux article for information prerequisites and tips for getting community supported distributions up and running.

While ARMv7l (AArch32) and ARMv8l (AArch64) support is available, some extensions installed on these devices may not work due to the use of x86 native code in the extension.

Installation

  1. Install VS Code or VS Code - Insiders and this extension.

  2. Install an OpenSSH compatible SSH client.

  3. If you do not have a SSH host set up, follow the directions for Linux, Windows 10 / Server (1803+), or macOS or create a VM on Azure.

Getting started

Follow the step-by-step tutorial or if you have a simple SSH host setup, connect to it as follows:

  1. Press F1 and run the Remote-SSH: Open SSH Host... command.
  2. Enter your user and host/IP in the following format in the input box that appears and press enter: user@host-or-ip or user@domain@host-or-ip
  3. If prompted, enter your password (but we suggest setting up key based authentication).
  4. After you are connected, use File > Open Folder to open a folder on the host.

You can press F1 to bring up the Command Palette and type in Remote-SSH for a full list of available commands.

You can also click on the Remote 'Quick Access' status bar item in the lower left corner to get a list of the most common commands.

For more information, please see the extension documentation.

Release Notes

While an optional install, this extension releases with VS Code. VS Code release notes include a summary of changes to all three Remote Development extensions with a link to detailed release notes.

As with VS Code itself, the extensions update during a development iteration with changes that are only available in VS Code Insiders Edition.

Visual Studio Remote Desktop Download

Questions, Feedback, Contributing

Have a question or feedback?

  • See the documentation or the troubleshooting guide.
  • Up-vote a feature or request a new one, search existing issues, or report a problem.
  • Contribute to our documentation
  • ...and more. See our CONTRIBUTING guide for details.

Or connect with the community...

Telemetry

Visual Studio Code Remote - SSH and related extensions collect telemetry data to help us build a better experience working remotely from VS Code. We only collect data on which commands are executed. We do not collect any information about image names, paths, etc. The extension respects the telemetry.enableTelemetry setting which you can learn more about in the Visual Studio Code FAQ.

License

By downloading and using the Visual Studio Remote - SSH extension and its related components, you agree to the product license terms and privacy statement.