Skip to content

Can not connect to remote through Remote-SSH Extension after latest update #964

Closed

Description

@catexis

Can not connect to remote host through Remote-SSH extension after latest updates. Reinstall extension or VSCode did not help.

  • VSCode Version:
Version: 1.36.1 (user setup)
Commit: 2213894ea0415ee8c85c5eea0d0ff81ecc191529
Date: 2019-07-08T22:59:35.033Z
Electron: 4.2.5
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362
  • Remote OS Version:
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

  1. Install VSCode 1.36.1
  2. Install Remote-SSH 0.44.1

I get this output in console:

[email protected]
win32 x64
SSH Resolver called for "ssh-remote+work_ubu", attempt 1
SSH Resolver called for host: work_ubu
Setting up SSH remote "work_ubu"
Using commit id "2213894ea0415ee8c85c5eea0d0ff81ecc191529" and quality "stable" for server
Testing ssh with ssh -V
ssh exited with code: 0
Got stderr from ssh: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
Using SSH config file "C:\Users\kalashnikov\.ssh\config"
Install and start server if needed
> 
> �]0;C:\WINDOWS\SYSTEM32\cmd.exe�
> 
> write: Connection refused
> 
> Попытка записи в несуществующий канал.
> 
"install" terminal command done
Received install output: Попытка записи в несуществующий канал.
Failed to parse remote port from server output: Попытка записи в несуществующий канал.

------

Code_2019-07-12_14-53-08

Activity

  1. sakuragiyuuto commented on Jul 12, 2019

    @sakuragiyuuto

    I also have the similar problem.
    VSCode Version and Remote OS version are same as above.
    In my case,
    I could not connect to guest OS on VirtualBox,
    but I can connect to host OS.
    When I connect with ssh provided by Windows,
    both can be connected.

    ssh config is as follows:

    # On VirtualBox
    Host test_vscode
        HostName localhost
        user hello
        IdentityFile ~/.ssh/id_rsa
        port 22222
    
    # On native(hostname is fake.)
    Host test_n
        Hostname exmaple.com
        user hello
        IdentityFile ~/.ssh/id_ecdsa
        port 22
    

    Maybe, I guess that the code around the port doesn't work well.

    Both OS's lsb is as follows:

    $ cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=18.04
    DISTRIB_CODENAME=bionic
    DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
    
  2. bcronje commented on Jul 12, 2019

    @bcronje

    Similar issue on my side, same versions. SSH connection used to take around max 5 seconds to open folder, as of today it takes around 40 seconds to load.

  3. roblourens commented on Jul 12, 2019

    @roblourens
    Member

    Beyers Cronje (@bcronje) please open a new issue.

    I don't know what the problem could be. "after latest updates" do you mean vscode update or the extension update?

    Can you try downloading the Insiders' build and tell me whether it happens there? https://code.visualstudio.com/insiders

  4. self-assigned this
    on Jul 12, 2019
  5. added
    ssh
    on Jul 12, 2019
  6. ostanislaw commented on Jul 12, 2019

    @ostanislaw

    I faced the same issue #961. It seems it is independent of the VS Code version 1.36.0 or 1.36.1. I've seen the same on latest and also previous version of vscode stable. After downgrade to 0.44.0 it is fine with 1.36.1.

  7. roblourens commented on Jul 12, 2019

    @roblourens
    Member

    I am not sure what's going on. Thanks for testing with downgrading. Could someone try with the nightly version of the ssh extension and share the log from the Remote-SSH output channel?

  8. catexis commented on Jul 13, 2019

    @catexis
    Author

    Thank you, ostanislaw - it's help for me. Now i have two opened terminals: with bash and with ssh tunnel. Is it correct?
    Code_2019-07-13_07-33-46

  9. ostanislaw commented on Jul 13, 2019

    @ostanislaw

    catexis it seems you have connected properly. I don't remember if any SSH Tunnel shell was on the list in my case.

  10. sakuragiyuuto commented on Jul 13, 2019

    @sakuragiyuuto

    roblourens Thank you for your response.
    Is version 0.44.2 the nightly version of the ssh extension?
    If this version is not, can you tell me how to install nightly version?

    Remote - SSH version
    
    Name: Remote - SSH
    Id: ms-vscode-remote.remote-ssh
    Description: Open any folder on a remote machine using SSH and take advantage of VS Code's full feature set.
    Version: 0.44.2
    Publisher: Microsoft
    VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh
    
    

    In case of version 0.44.2, I can connected to Both servers.
    Remote - SSH output is as follows:

    OUTPUT
    
    [email protected]
    win32 x64
    SSH Resolver called for "ssh-remote+test_vscode", attempt 1
    SSH Resolver called for host: test_vscode
    Setting up SSH remote "test_vscode"
    Using commit id "2213894ea0415ee8c85c5eea0d0ff81ecc191529" and quality "stable" for server
    Testing ssh with ssh -V
    ssh exited with code: 0
    Got stderr from ssh: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
    Running script with connection command: "ssh"  -o ClearAllForwardings=true    "test_vscode" bash
    Install and start server if needed
    > 
    > �]0;C:\WINDOWS\SYSTEM32\cmd.exe�
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > Enter passphrase for key 'C:\Users\sakuragi/.ssh/id_rsa': 
    > Enter passphrase for key 'C:\Users\sakuragi/.ssh/id_rsa':
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > Running remote connection script
    > 
    > Found existing installation at /home/hello/.vscode-server/bin/2213894ea0415ee8c85c5eea0d0ff81ecc191529...
    > 
    > SSH_CONNECTION=10.0.2.2 58362 10.0.2.15 22
    > LANG=en_US.UTF-8
    > XDG_SESSION_ID=7
    > USER=hello
    > PWD=/home/hello
    > HOME=/home/hello
    > SSH_CLIENT=10.0.2.2 58362 22
    > MAIL=/var/mail/hello
    > SHELL=/bin/bash
    > SHLVL=2
    > 
    > LANGUAGE=en_US:en
    > 
    > VSCODE_AGENT_FOLDER=/home/hello/.vscode-server
    > 
    > LOGNAME=hello
    > 
    > XDG_RUNTIME_DIR=/run/user/1000
    > 
    > PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
    > 
    > _=/usr/bin/printenv
    > 
    > 
    > Starting server...
    > 
    > Waiting for server log...
    > 
    > 
    > Waiting for server log...
    > 
    > 
    > Waiting for server log...
    > 
    > 
    > Waiting for server log...
    > 
    > 
    >  
    > 
    > 
    > *
    > 
    > * Reminder: You may only use this software with Visual Studio family products,
    > 
    > * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
    > 
    > *
    > 
    > 
    > 
    > 
    > 2463c880-8002-4264-a278-b680572547a4==40883==39943==
    > 
    > 
    "install" terminal command done
    Received install output: 2463c880-8002-4264-a278-b680572547a4==40883==39943==
    Server is listening on port 40883
    Running script with connection command: "ssh" -L 127.0.0.1:40883:127.0.0.1:40883     "test_vscode" bash
    Spawning tunnel with: type "C:\Users\sakuragi\AppData\Local\Temp\vscode-linux-multi-line-command-test_vscode-936298268.sh" | "ssh" -L 127.0.0.1:40883:127.0.0.1:40883     "test_vscode" bash
    > 
    > �]0;C:\WINDOWS\SYSTEM32\cmd.exe�
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > Enter passphrase for key 'C:\Users\sakuragi/.ssh/id_rsa': 
    > Enter passphrase for key 'C:\Users\sakuragi/.ssh/id_rsa':
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > 
    > Connected to SSH Host - Please do not close this terminal
    > 
    Spawned SSH tunnel between local port 40883 and remote port 40883
    Waiting for ssh tunnel to be ready
    Tunneling remote port 40883 to local port 40883
    Resolved "ssh-remote+test_vscode" to "127.0.0.1:40883"
    ------
    
    
  11. iamjrock commented on Jul 13, 2019

    @iamjrock

    Same issue here on VS Code insiders 1.37.0. I would like to downgrade the remote-ssh extension to 0.44.0 until it is fixed.

    However, all of my Extensions are not showing, presumably because many of them plus various settings files are located on the remote (that can't be connected to):

    image

    Given this, does anyone know how I go about downgrading the remote-ssh Extension?

  12. catexis commented on Jul 13, 2019

    @catexis
    Author

    jrock (@iamjrock) you can do this:
    Code_2019-07-13_17-39-05

  13. iamjrock commented on Jul 13, 2019

    @iamjrock

    Thx for replying catexis, appreciated.

    Unfortunately when I select the Extensions icon (your step 1) the Extensions are not listed.

    I am guessing that is is something to do with my Workspace settings being stored on the remote?

    It is empty as per my image in the earlier post (note: in latest Insiders the icons have changed).

  14. iamjrock commented on Jul 13, 2019

    @iamjrock

    roblourens, could this be related to the following recent "Improve finding SSH" enhancement?

  15. iamjrock commented on Jul 13, 2019

    @iamjrock

    OK, managed to get my extensions to show and upgrading the remote-ssh extension to v0.44.2 seems to have fixed the issue for me. Now connecting to the remote as usual.

  16. roblourens commented on Jul 13, 2019

    @roblourens
    Member

    upgrading the remote-ssh extension to v0.44.2 seems to have fixed the issue for me

    Good to hear. It must have been related to the other fix I made for 0.44.2 although I'm not sure how. Can anyone else try the latest and let me know if it helps?

  17. added
    info-needed
    on Jul 13, 2019
  18. alexander-mart commented on Jul 14, 2019

    @alexander-mart

    I have the same error on v0.44.2 right now.

    VS Code version

    image

    My config
    # Read more about SSH config files: https://linux.die.net/man/5/ssh_config
    Host roboteam
        HostName 46.229.212.5
        User roboteam-git
    Host new2bas
        HostName margaret.timeweb.ru
        User new2bas
    
    output
    [email protected]
    win32 x64
    SSH Resolver called for "ssh-remote+new2bas", attempt 1
    SSH Resolver called for host: new2bas
    Setting up SSH remote "new2bas"
    Using commit id "2213894ea0415ee8c85c5eea0d0ff81ecc191529" and quality "stable" for server
    Testing ssh with ssh -V
    ssh exited with code: 0
    Got stderr from ssh: OpenSSH_7.5p1, without OpenSSL
    Running script with connection command: "ssh"  -o ClearAllForwardings=true    "new2bas" bash
    Install and start server if needed
    > 
    > key_load_public: invalid format
    > 
    > Unable to negotiate with 92.53.96.151 port 22: no matching host key type found.
    > Their offer: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256
    > Попытка записи в несуществующий канал.
    > 
    "install" terminal command done
    Received install output: Попытка записи в несуществующий канал.
    Failed to parse remote port from server output: Попытка записи в несуществующий канал.
    
    ------
    
    Remote OS Version
     lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 14.04.6 LTS
    Release:        14.04
    Codename:       trusty
    
    
  19. roblourens commented on Jul 14, 2019

    @roblourens
    Member

    @GreenRobot777 you are seeing a different issue. Guessing the problem is with

    without OpenSSL

  20. ostanislaw commented on Jul 15, 2019

    @ostanislaw

    remote-ssh 0.44.2 issue fixed for me

  21. JennieJi commented on Jul 23, 2019

    @JennieJi

    2019-07-23 22_12_09-Welcome
    mine cannot work in either 0.44.2 or 0.44.0

  22. roblourens commented on Jul 23, 2019

    @roblourens
    Member

    Closing this as some say it is fixed. Jennie (@JennieJi) you can open a new issue.

  23. JennieJi commented on Jul 24, 2019

    @JennieJi

    oh ok

  24. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

info-neededssh

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions