Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After Update to 1.43.0 No longer can SSH with VS Code #2545

Closed
AlanW5510 opened this issue Mar 13, 2020 · 13 comments
Closed

After Update to 1.43.0 No longer can SSH with VS Code #2545

AlanW5510 opened this issue Mar 13, 2020 · 13 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@AlanW5510
Copy link

I have been using VS Code Remote-SSH extensions since it was released to SSH into several CentOS boxes. Then all of a sudden, a few days ago I have not been able to SSH. I have been getting two errors which were:

Warning: the ECDSA host key for 'server differs from the IP address 'x.x.x.x' and
Visual Studio code could not establish connection to server. Could not resolve hostname

So I deleted my known_hosts and when I try to connect now it does ask me to accept the finger print and type yes, and I don’t get those warnings anymore but in VS Code It says Enter password for alawoo@ and that is not an account on the CentOS server so I cannot use that. But in my Remote-SSH Configuration file I have the name alan and this is what I need to use. You can see this in the screen shot. I have removed Port 22 and added it to try both ways. But I have used it without having Port 22 since the extension has been out.

I am not sure if there is any other way to specify the user I want to use to SSH with other than this file. I found a post that said search conpty and uncheck it but it still asks for the password of alawoo. I have also deleted and re-created the SSH public and private keys and copied the public keys to the servers again but keeps asking for password.
SSH Screen
Remote-SSh Version

@AlanW5510
Copy link
Author

I ended up taking the hyphen out of the name because I read several post with () in the username causing issues. So the name is Svrmonitor & I have tired svrmonitor. After taking that out it does not ask for the password anymore but now I get this in the log.

[09:37:12.764] Log Level: 2
[09:37:12.769] [email protected]
[09:37:12.769] win32 x64
[09:37:12.771] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a225376726d6f6e69746f72227d", attempt 1
[09:37:12.771] SSH Resolver called for host: Svrmonitor
[09:37:12.771] Setting up SSH remote "Svrmonitor"
[09:37:12.774] Acquiring local install lock: C:\Users\alawoo\AppData\Local\Temp\vscode-remote-ssh-Svrmonitor-install.lock
[09:37:12.789] Looking for existing server data file at c:\Users\alawoo\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-Svrmonitor-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json
[09:37:12.790] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[09:37:12.791] Install and start server if needed
[09:37:12.793] Checking ssh with "ssh -V"
[09:37:12.848] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[09:37:12.848] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[09:37:12.898] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[09:37:12.898] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[09:37:13.087] > OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
[09:37:13.089] askpass server listening on \.\pipe\vscode-ssh-askpass-c7e909aa2b5c3d4063bac9ac93890fe2d032e36d-sock
[09:37:13.089] Spawning local server with {"ipcHandlePath":"\\.\pipe\vscode-ssh-askpass-85795f28529a6fd678c68395edb175629ad8c1bd-sock","sshCommand":"C:\Program Files\Git\usr\bin\ssh.exe","sshArgs":["-v","-T","-D","52531","Svrmonitor"],"dataFilePath":"c:\Users\alawoo\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-Svrmonitor-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json"}
[09:37:13.090] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\alawoo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\local-server\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\Program Files\Microsoft VS Code\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\alawoo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-c7e909aa2b5c3d4063bac9ac93890fe2d032e36d-sock"}
[09:37:13.096] Spawned 11344
[09:37:13.202] > local-server> Spawned ssh: 13048
[09:37:13.255] stderr> OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
[09:37:24.282] stderr> ssh: Could not resolve hostname svrmonitor: Name or service not known
[09:37:24.298] > local-server> ssh child died, shutting down
[09:37:24.312] Local server exit: 0
[09:37:24.312] Received install output: OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
ssh: Could not resolve hostname svrmonitor: Name or service not known

[09:37:24.314] Resolver error: Could not resolve hostname
[09:37:24.317] ------

@AlanW5510
Copy link
Author

I did down grade the Remote-SSH to 0.49.0 and now it is all working again.
downgrade

@AlanW5510
Copy link
Author

AlanW5510 commented Mar 13, 2020

One thing I noticed between the Remote-SSH version 0.49 and 0.50, is when I connect to the server after clearing my known_hosts file, using Remote-SSH version 0.49 the known_hosts goes to this location - C:\Users\alawoo.ssh\known_hosts where I think it should go, and on Remote-SSH version 0.50 the known_hosts goes to my home drive that is set and mapped in Active Directory. That creates a .ssh folder and puts the known_hosts file there.

When the known_hosts file is in the Active Directory location this is when it askes me for the password for the user alawoo and does not seem to use the config file user.

@bjayakumar
Copy link

Thanks Downgrading works for me as well.

@elliotpeele
Copy link

I had the same problem MacOS -> Linux. The output pane had the login text from the remote and then Resolve Error: SSH Connection Timeout.

Reverting to 0.49.0 resolved the issue.

@curt7000
Copy link

I was receiving a "failed to create hard link file exists" error. Downgrading to 0.49.0 resolved the issue.

@bnmnetp
Copy link

bnmnetp commented Mar 14, 2020

Same for me, all was working fine until I updated, then suddenly could not connect anymore. Hopefully this will help isolate the problem.

[08:14:41.262] Log Level: 2
[08:14:41.263] [email protected]
[08:14:41.263] darwin x64
[08:14:41.264] SSH Resolver called for "ssh-remote+rsdev", attempt 1
[08:14:41.265] SSH Resolver called for host: rsdev
[08:14:41.265] Setting up SSH remote "rsdev"
[08:14:41.267] Acquiring local install lock: /var/folders/4x/6kgr9sws2ws6s68t48kc75840000gn/T/vscode-remote-ssh-rsdev-install.lock
[08:14:41.277] Looking for existing server data file at /Users/xxxx/Library/Application Support/Code - Insiders/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-rsdev-efd7548df65de8e775015b67863190e6bd4934fc/data.json
[08:14:41.277] Using commit id "efd7548df65de8e775015b67863190e6bd4934fc" and quality "insider" for server
[08:14:41.278] Install and start server if needed
[08:14:41.280] Checking ssh with "ssh -V"
[08:14:41.293] > OpenSSH_8.1p1, LibreSSL 2.7.3
[08:14:41.295] askpass server listening on /var/folders/4x/6kgr9sws2ws6s68t48kc75840000gn/T/vscode-ssh-askpass-2f950969aab530958085af25d4445624c324495d.sock
[08:14:41.295] Spawning local server with {"ipcHandlePath":"/var/folders/4x/6kgr9sws2ws6s68t48kc75840000gn/T/vscode-ssh-askpass-af10994e510e513c981f684187f367e2d47a5e07.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","59116","-o","ConnectTimeout=15","rsdev"],"dataFilePath":"/Users/xxx/Library/Application Support/Code - Insiders/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-rsdev-efd7548df65de8e775015b67863190e6bd4934fc/data.json"}
[08:14:41.295] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/xxx/.vscode-insiders/extensions/ms-vscode-remote.remote-ssh-0.50.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/private/var/folders/4x/6kgr9sws2ws6s68t48kc75840000gn/T/AppTranslocation/2E3DB790-7765-46EC-842E-3881E9B50674/d/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Renderer).app/Contents/MacOS/Code - Insiders Helper (Renderer)","VSCODE_SSH_ASKPASS_MAIN":"/Users/xxx/.vscode-insiders/extensions/ms-vscode-remote.remote-ssh-0.50.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/4x/6kgr9sws2ws6s68t48kc75840000gn/T/vscode-ssh-askpass-2f950969aab530958085af25d4445624c324495d.sock"}
[08:14:41.298] Spawned 43744
[08:14:41.382] > local-server> Spawned ssh: 43745
[08:14:41.385] stderr> OpenSSH_8.1p1, LibreSSL 2.7.3
[08:14:41.880] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:w++x6uG/szftlbSzYICxb679todrsu6efYwv5kO2HNs
[08:14:42.380] stderr> Authenticated to dev.xxx.xxx ([xxx.xx.xxx.xxx]:22).
[08:14:58.304] Terminating local server
[08:14:58.306] Resolver error: Connecting with SSH timed out
[08:14:58.311] ------




[08:14:58.312] Local server exit: 15

Downgrading to 0.49.0 restores normal operation.

@granjerox
Copy link

granjerox commented Mar 15, 2020

Same problem here, had to downgrade.

Connecting falls in infinite loop

[16:35:23.592] Log Level: 2
[16:35:23.601] [email protected]
[16:35:23.601] win32 x64
[16:35:23.602] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a22617374657269736b564d227d", attempt 1
[16:35:23.602] SSH Resolver called for host: asteriskVM
[16:35:23.603] Setting up SSH remote "asteriskVM"
[16:35:23.607] Acquiring local install lock: C:\Users\FGRANJ~1.HER\AppData\Local\Temp\vscode-remote-ssh-asteriskVM-install.lock
[16:35:23.630] Looking for existing server data file at c:\Users\XXXXX\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-asteriskVM-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json
[16:35:23.631] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[16:35:23.632] Install and start server if needed
[16:35:23.636] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[16:35:25.283] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:35:25.286] askpass server listening on \.\pipe\vscode-ssh-askpass-b2ed2b82e1cf19d9aff1d131dd24f844c6a1a6fa-sock
[16:35:25.287] Spawning local server with {"ipcHandlePath":"\\.\pipe\vscode-ssh-askpass-4fa0902dec6600228dd63a31ba652cabcc8ac787-sock","sshCommand":"C:\Windows\System32\OpenSSH\ssh.exe","sshArgs":["-v","-T","-D","61606","asteriskVM"],"dataFilePath":"c:\Users\XXX\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-asteriskVM-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json"}
[16:35:25.287] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\XXX\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\local-server\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\Users\XXX\AppData\Local\Programs\Microsoft VS Code\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\XXX\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-b2ed2b82e1cf19d9aff1d131dd24f844c6a1a6fa-sock"}
[16:35:26.065] Spawned 24324
[16:35:27.023] > local-server> Spawned ssh: 12652
[16:35:27.757] stderr> OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:35:29.805] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:xsk5H4ZWyKW1FT50qCe4HLBuUcHrDfNGu4q5gAja/gs
[16:35:29.830] stderr> Authenticated to localhost ([127.0.0.1]:22).
[16:35:30.492] > Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-76-generic x86_64)

System information as of Sun Mar 15 16:35:29 CET 2020

System load: 0.05 Processes: 123
Usage of /: 58.8% of 14.70GB Users logged in: 1
Memory usage: 21% IP address for enp0s3: 10.0.2.15
Swap usage: 0%

  • Latest Kubernetes 1.18 beta is now available for your laptop, NUC, cloud
    instance or Raspberry Pi, with automatic updates to the final GA release.

    sudo snap install microk8s --channel=1.18/beta --classic

  • Multipass 1.1 adds proxy support for developers behind enterprise
    firewalls. Rapid prototyping for cloud operations just got easier.

    https://multipass.run/

  • Canonical Livepatch is available for installation.

2 packages can be updated.
0 updates are security updates.

*** System restart required ***
[16:35:30.501] > ready: 8f58031b5b54
[16:35:30.503] > Linux 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020
[16:35:30.503] Platform: linux
[16:35:30.516] > 8f58031b5b54: running
[16:35:30.532] > Acquiring lock on /var/lib/asterisk/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.asterisk.78a4c91400152c0f27ba4d363eb56d2835f9903a
[16:35:30.533] > \ln /var/lib/asterisk/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.asterisk.78a4c91400152c0f27ba4d363eb56d2835f9903a.target /var/lib/asterisk/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.asterisk.78a4c91400152c0f27ba4d363eb56d2835f9903a
[16:35:30.534] stderr> ln:
[16:35:30.534] stderr> failed to create hard link '/var/lib/asterisk/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.asterisk.78a4c91400152c0f27ba4d363eb56d2835f9903a': File exists
[16:35:30.534] > Installation already in progress...
8f58031b5b54##24##
[16:35:30.534] Received install output: 8f58031b5b54##24##
[16:35:30.534] Server installation process already in progress - waiting and retrying
[16:35:30.535] Terminating local server
[16:35:30.546] Local server exit: null
[16:35:31.540] askpass server listening on \.\pipe\vscode-ssh-askpass-1c0c1d3fcd98cd220aabd32315bc4add2a5d4489-sock
[16:35:31.540] Spawning local server with {"ipcHandlePath":"\\.\pipe\vscode-ssh-askpass-5c5633b917a0aa12b4921173c5c309fb50a41bd4-sock","sshCommand":"C:\Windows\System32\OpenSSH\ssh.exe","sshArgs":["-v","-T","-D","61606","asteriskVM"],"dataFilePath":"c:\Users\XXX\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-asteriskVM-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json"}
[16:35:31.540] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\XXX\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\local-server\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\Users\XXX\AppData\Local\Programs\Microsoft VS Code\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\XXX\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-1c0c1d3fcd98cd220aabd32315bc4add2a5d4489-sock"}
[16:35:32.224] Spawned 11348
[16:35:33.285] > local-server> Spawned ssh: 30824
[16:35:34.068] stderr> OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:35:36.112] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:xsk5H4ZWyKW1FT50qCe4HLBuUcHrDfNGu4q5gAja/gs
[16:35:36.133] stderr> Authenticated to localhost ([127.0.0.1]:22).
[16:35:36.787] > Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-76-generic x86_64)

System information as of Sun Mar 15 16:35:36 CET 2020

System load: 0.05 Processes: 124
Usage of /: 58.8% of 14.70GB Users logged in: 1
Memory usage: 21% IP address for enp0s3: 10.0.2.15
Swap usage: 0%

  • Latest Kubernetes 1.18 beta is now available for your laptop, NUC, cloud
    instance or Raspberry Pi, with automatic updates to the final GA release.

    sudo snap install microk8s --channel=1.18/beta --classic

  • Multipass 1.1 adds proxy support for developers behind enterprise
    firewalls. Rapid prototyping for cloud operations just got easier.

    https://multipass.run/

  • Canonical Livepatch is available for installation.

2 packages can be updated.
0 updates are security updates.

*** System restart required ***
[16:35:36.796] > ready: 8f58031b5b54
[16:35:36.799] > Linux 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020
[16:35:36.799] Platform: linux
[16:35:36.813] > 8f58031b5b54: running
[16:35:36.829] > Acquiring lock on /var/lib/asterisk/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.asterisk.78a4c91400152c0f27ba4d363eb56d2835f9903a
[16:35:36.831] > \ln /var/lib/asterisk/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.asterisk.78a4c91400152c0f27ba4d363eb56d2835f9903a.target /var/lib/asterisk/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.asterisk.78a4c91400152c0f27ba4d363eb56d2835f9903a
[16:35:36.831] stderr> ln:
[16:35:36.832] stderr> failed to create hard link '/var/lib/asterisk/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.asterisk.78a4c91400152c0f27ba4d363eb56d2835f9903a'
[16:35:36.834] > Installation already in progress...
8f58031b5b54##24##
[16:35:36.834] Received install output: 8f58031b5b54##24##
[16:35:36.834] Server installation process already in progress - waiting and retrying
[16:35:36.834] Terminating local server
[16:35:36.835] stderr> : File exists
[16:35:36.846] Local server exit: null
[16:35:37.841] askpass server listening on \.\pipe\vscode-ssh-askpass-6dc145e47a937d924f7cc2ff6632f24ab49887fd-sock
[16:35:37.842] Spawning local server with {"ipcHandlePath":"\\.\pipe\vscode-ssh-askpass-0f8b40f4fac332ce135fa4b4a4df07a326625fd8-sock","sshCommand":"C:\Windows\System32\OpenSSH\ssh.exe","sshArgs":["-v","-T","-D","61606","asteriskVM"],"dataFilePath":"c:\Users\XXX\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-asteriskVM-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json"}
[16:35:37.843] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\XXX\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\local-server\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\Users\XXX\AppData\Local\Programs\Microsoft VS Code\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\XXX\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-6dc145e47a937d924f7cc2ff6632f24ab49887fd-sock"}
[16:35:38.543] Spawned 20036
[16:35:39.329] > local-server> Spawned ssh: 20244
[16:35:40.049] stderr> OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5

@roblourens
Copy link
Member

This looks like a duplicate of #2512 (using wrong username)

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Mar 16, 2020
@elliotpeele
Copy link

I don't know that those are the same issue. In my case I have the same username on the client and server. Also not using Windows.

@AlanW5510
Copy link
Author

AlanW5510 commented Mar 17, 2020 via email

@roblourens
Copy link
Member

@elliotpeele I don't know what your issue is, I would need more details. You can open your own issue, I am looking at the OP's issue.

@elliotpeele
Copy link

@roblourens fair enough, I'll work on reproducing the error that I'm seeing to provide better details and open a new issue.

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

7 participants