none
Unable to add SSH connection to Remote System in Visual Studio 2017

    Question

  • I am encountering the problem when setting up the remote debug link to Linux server. The problem is that I can’t add the remote server to the “Connection Manager” for SSH debug type.

    The Linux server 10.92.131.11 has OpenSSH server, port number is 22. And I can connect to it via any type of SSH client in my local.

    When I tried to add the host to VS2017 for debug, first time I clicked “Connect” in below form, no response after being processed for seconds.


    And second time clicked it, it gave me below error msg “Connectivity Failure. Please make sure host name and port number are correct.”, even though both host name and port were typed in correctly.

    Later on I traced the SSH server log in Linux, which shows 2 connections had been established from VS2017 to Linux server actually. But seems they were waiting for something. I was wondering if it lacks something in the Linux server, like GDBServer. Hope someone could help here. Appreciate it.

    Thursday, June 29, 2017 10:45 AM

All replies

  • Found the cause.

    it's due to 

    System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.

    After set below

    HKLM\SYSTEM\CURRENTCONTROLSET\CONTROL\LSA\FIPSALGORITHMPOLICY set DWORD Enabled = 0

    It works.


    Friday, June 30, 2017 5:39 AM
  • Hi Robin Yuan,

    Glad to know that you have resolved this issue, if possible, you could mark your reply as the answer, so it could help other community members who get the same issue, and I could close this case for you:)

    Sincerely,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, June 30, 2017 10:17 AM
    Moderator
  • Found the cause.

    it's due to 

    System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.

    After set below

    HKLM\SYSTEM\CURRENTCONTROLSET\CONTROL\LSA\FIPSALGORITHMPOLICY set DWORD Enabled = 0

    It works.


    Can you share where you saw the System.InvalidOperationException? I don't see this but am having the same issue you described when trying to add a remote system under Connection Manager.

    Unfortunately, the registry setting you mentioned was already set to 0 for me. I'm wondering if there is a similar solution but slightly different for my situation.

    My sshd used the following sshd_config: https://github.com/Azure-App-Service/node/blob/master/8.2.1/sshd_config

    I'm able to ssh in successfully from a command prompt.

    Monday, August 27, 2018 4:50 PM
  • Solved my issue. I had installed openssh-server and apparently should have used openssh-sftp-server instead. This thread was a good resource on diagnosing this: https://github.com/Microsoft/VSLinux/issues/132. In addition to having openssh-sftp-server your /etc/ssh/sshd_config better have "Subsystem sftp /usr/lib/openssh/sftp-server" in it... which the github file from Azure-AppService did not.
    Monday, August 27, 2018 8:46 PM