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

Unable to connect to a remote Rocky-Linux-9.5 #10630

Open
bdosenov opened this issue Jan 14, 2025 · 3 comments
Open

Unable to connect to a remote Rocky-Linux-9.5 #10630

bdosenov opened this issue Jan 14, 2025 · 3 comments
Assignees
Labels
info-needed Issue requires more information from poster ssh Issue in vscode-remote SSH

Comments

@bdosenov
Copy link

Type: Bug

I had a working setup for weeks, being able to connect to a remote server using pwd-authentication. Yesterday, all of a sudden, my SSH connection to the server stopped working with the following output:

[15:53:11.995] Using SSH config file "C:\Users\bdosenov.ssh\config"
[15:53:11.996] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 58254 -F "C:\Users\bdosenov.ssh\config" "blndc01-godbox-boot-shared" sh
[15:53:11.997] Generated SSH command: 'type "C:\Users\bdosenov\AppData\Local\Temp\vscode-linux-multi-line-command-blndc01-godbox-boot-shared-104281145.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 58254 -F "C:\Users\bdosenov.ssh\config" "blndc01-godbox-boot-shared" sh'
[15:53:11.998] Using connect timeout of 17 seconds
[15:53:11.999] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[15:53:13.526] "install" terminal received data: "bdosenov@blndc01-godbox-boot-shared's password:"
[15:53:13.527] Got some output, clearing connection timeout
[15:53:13.528] Showing password prompt
[15:53:21.101] Got password response
[15:53:21.101] "install" wrote data to terminal: "********************"
[15:53:21.149] "install" terminal received data: ""
[15:53:40.682] "install" terminal received data: "client_loop: send disconnect: Connection reset
The process tried to write to a nonexistent pipe."
[15:53:42.427] "install" terminal command done
[15:53:42.428] Install terminal quit with output: client_loop: send disconnect: Connection reset
[15:53:42.428] Received install output: client_loop: send disconnect: Connection reset
[15:53:42.428] Stopped parsing output early. Remaining text: client_loop: send disconnect: Connection reset
[15:53:42.429] WARN: $PLATFORM is undefined in installation script output. Errors may be dropped.
[15:53:42.429] Failed to parse remote port from server output
[15:53:42.431] Resolver error: Error:
at v.Create (c:\Users\bdosenov.vscode\extensions\ms-vscode-remote.remote-ssh-0.116.1\out\extension.js:2:696499)
at t.handleInstallOutput (c:\Users\bdosenov.vscode\extensions\ms-vscode-remote.remote-ssh-0.116.1\out\extension.js:2:694580)
at t.tryInstall (c:\Users\bdosenov.vscode\extensions\ms-vscode-remote.remote-ssh-0.116.1\out\extension.js:2:812473)
at async c:\Users\bdosenov.vscode\extensions\ms-vscode-remote.remote-ssh-0.116.1\out\extension.js:2:771431
at async t.withShowDetailsEvent (c:\Users\bdosenov.vscode\extensions\ms-vscode-remote.remote-ssh-0.116.1\out\extension.js:2:774668)
at async x (c:\Users\bdosenov.vscode\extensions\ms-vscode-remote.remote-ssh-0.116.1\out\extension.js:2:768087)
at async t.resolve (c:\Users\bdosenov.vscode\extensions\ms-vscode-remote.remote-ssh-0.116.1\out\extension.js:2:772083)
at async c:\Users\bdosenov.vscode\extensions\ms-vscode-remote.remote-ssh-0.116.1\out\extension.js:2:1055245
[15:53:42.435] TELEMETRY: {"eventName":"resolver","properties":{"osReleaseId":"","arch":"","askedPw":"0","askedPassphrase":"0","asked2fa":"0","askedHostKey":"0","remoteInConfigFile":"1","gotUnrecognizedPrompt":"0","dynamicForwarding":"1","localServer":"0","didLocalDownload":"0","installUnpackCode":"0","outcome":"failure","reason":"UnparsableOutput","exitCodeLabel":""},"measures":{"resolveAttempts":1,"isExecServer":0,"timing.totalResolveTime":30518,"timing.preSshTime":87,"timing.scriptTime":30430}}
[15:53:42.437] ------
[15:53:42.438] No hints found in the recent session.

ssh connection works fine by using windows cmd-shell with the same connection values as entered in vscode. Both the shell and vscode use the same ssh client: OpenSSH\ssh.exe.

In the meantime I have removed all the vscode files/folders on the remote server under my home dir, restarted sshd as well as the machine itself. I have uninstalled and installed the Remote-SSH extension multiple times, uninstalled and installed the vscode itself multiple times and I cannot seem to figure out what the issue is.

Extension version: 0.116.1
VS Code version: Code 1.96.3 (91fbdddc47bc9c09064bf7acf133d22631cbf083, 2025-01-09T18:14:09.060Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i7-1365U (12 x 2688)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.67GB (17.21GB free)
Process Argv --crash-reporter-id 9c1ec870-d3b1-4157-90c8-14bfe7dae4d2
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupytercf:31046870
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
390bf810:31215807
6074i472:31201624
dwoutputs:31217127

@vs-code-engineering vs-code-engineering bot added the ssh Issue in vscode-remote SSH label Jan 14, 2025
@joshspicer
Copy link
Member

joshspicer commented Jan 14, 2025

Would you please follow the steps in the issue template? Specifically, please include your entire log and also share the behavior of SSH'ing to your host with the exact SSH string that is printed in that log.

From your log snippet I see : "client_loop: send disconnect: Connection reset, which appears to be coming from your local ssh program.

@joshspicer joshspicer added the info-needed Issue requires more information from poster label Jan 14, 2025
@bdosenov
Copy link
Author

bdosenov commented Jan 17, 2025

Hi, thanks for the quick response. Below you'll find three log files:

  • one with the entire trace-level output in vscode (fails)
  • one with the cli openssh -vvv output of the command as shown in the vscode output (fails)
  • one with the cli openssh -vvv output of the modified ssh command by removing -T and-D arguments as well as the "sh" command at the end (works fine)

openssh_cli_output.txt
openssh_cli_output_withoutTandD_option.txt
vscode_trace_output.txt

The issue only appears when working from home. When connected to the office network, I do not face this problem.
Discovered MTU size at home is 1370B, I am assuming that this might be causing this issue

@bdosenov
Copy link
Author

I have discovered that a working openssh command when connecting from my home is:

PS C:\Users\bdosenov> ssh -v -D 63831 bdosenov@blndc01-godbox-boot-shared
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Reading configuration data C:\Users\bdosenov/.ssh/config
debug1: C:\Users\bdosenov/.ssh/config line 1: Applying options for blndc01-godbox-boot-shared
debug1: Connecting to blndc01-godbox-boot-shared [10.49.216.31] port 22.
debug1: Connection established.
debug1: identity file C:\Users\bdosenov/.ssh/id_rsa type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_rsa-cert type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_ecdsa type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_ecdsa_sk type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_ed25519 type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_ed25519-cert type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_ed25519_sk type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_ed25519_sk-cert type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_xmss type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_xmss-cert type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_dsa type -1
debug1: identity file C:\Users\bdosenov/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.7
debug1: compat_banner: match: OpenSSH_8.7 pat OpenSSH* compat 0x04000000
debug1: Authenticating to blndc01-godbox-boot-shared:22 as 'bdosenov'
debug1: load_hostkeys: fopen C:\Users\bdosenov/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen PROGRAMDATA\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen PROGRAMDATA\ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: compression: none
debug1: kex: client->server cipher: [email protected] MAC: compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:c6FvxpslR0KXzSxT2eQsQ1QM8FDlM6l94JBoZ9mOKpw
debug1: load_hostkeys: fopen C:\Users\bdosenov/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen PROGRAMDATA\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen PROGRAMDATA\ssh/ssh_known_hosts2: No such file or directory
debug1: Host 'blndc01-godbox-boot-shared' is known and matches the ED25519 host key.
debug1: Found key in C:\Users\bdosenov/.ssh/known_hosts:1
debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: C:\Users\bdosenov/.ssh/id_rsa
debug1: Will attempt key: C:\Users\bdosenov/.ssh/id_ecdsa
debug1: Will attempt key: C:\Users\bdosenov/.ssh/id_ecdsa_sk
debug1: Will attempt key: C:\Users\bdosenov/.ssh/id_ed25519
debug1: Will attempt key: C:\Users\bdosenov/.ssh/id_ed25519_sk
debug1: Will attempt key: C:\Users\bdosenov/.ssh/id_xmss
debug1: Will attempt key: C:\Users\bdosenov/.ssh/id_dsa
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected]>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: C:\Users\bdosenov/.ssh/id_rsa
debug1: Trying private key: C:\Users\bdosenov/.ssh/id_ecdsa
debug1: Trying private key: C:\Users\bdosenov/.ssh/id_ecdsa_sk
debug1: Trying private key: C:\Users\bdosenov/.ssh/id_ed25519
debug1: Trying private key: C:\Users\bdosenov/.ssh/id_ed25519_sk
debug1: Trying private key: C:\Users\bdosenov/.ssh/id_xmss
debug1: Trying private key: C:\Users\bdosenov/.ssh/id_dsa
debug1: Next authentication method: password
bdosenov@blndc01-godbox-boot-shared's password:
Authenticated to blndc01-godbox-boot-shared ([10.49.216.31]:22) using "password".
debug1: Local connections to LOCALHOST:63831 forwarded to remote address socks:0
debug1: Local forwarding listening on ::1 port 63831.
debug1: channel 0: new port-listener [port listener] (inactive timeout: 0)
debug1: Local forwarding listening on 127.0.0.1 port 63831.
debug1: channel 1: new port-listener [port listener] (inactive timeout: 0)
debug1: channel 2: new session [client-session] (inactive timeout: 0)
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: filesystem
debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the VTSequence from console
debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console supports the ansi parsing
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: client_input_hostkeys: searching C:\Users\bdosenov/.ssh/known_hosts for blndc01-godbox-boot-shared / (none)
debug1: client_input_hostkeys: searching C:\Users\bdosenov/.ssh/known_hosts2 for blndc01-godbox-boot-shared / (none)
debug1: client_input_hostkeys: hostkeys file C:\Users\bdosenov/.ssh/known_hosts2 does not exist
debug1: client_input_hostkeys: no new or deprecated keys from server
debug1: pledge: network
Last login: Fri Jan 17 11:50:44 2025 from 10.61.192.190
[bdosenov@blndc01-bootstrap ~]$

This means that I have to loose both "-T" and "sh" from the remote-ssh's command. I have managed to remove the -T option by manipulating remote-ssh Settings, but I am not able to get rid of the "sh".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

3 participants