microsoft / microsoft/vscode-remote-release

Feature request: SSH Connection error message pop up: Display stderr content

Open
#10,337 2 comments 13 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

feature-request ssh
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

We are using an OTP PAM module linked to our sshd server that challenges a user for an OTP. We are testing against SSH clients to make sure it is compatible with our user workflow.

Tested against vscode, the challenge is properly asked to the user:

working

(this part works great by default in vscode).

but when a user does not have OTP enabled, we make use of the PAM conversation to tell the user to connect to a URL to setup his OTP first. We push the message to the ssh client and abort the connection as it cannot proceed.

image

The popup message does not display the stderr content of the ssh client that would provide the user with meaningful information, i.e., why the connection aborted and how to fix it.

[14:44:28.018] > local-server-1> Running ssh connection command: ssh -v -T -D 41435 -o ConnectTimeout=15 rocky@10.40.0.33
[14:44:28.022] > local-server-1> Spawned ssh, pid=2675749
[14:44:28.025] stderr> OpenSSH_9.6p1 Ubuntu-3ubuntu13.5, OpenSSL 3.0.13 30 Jan 2024
[14:44:28.118] stderr> debug1: Server host key: ssh-ed25519 
[14:44:28.236] stderr> 
[14:44:28.236] stderr> https://<URL>/realms/oauth-dev/account
[14:44:28.236] stderr> 
[14:44:28.263] stderr> No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
[14:44:28.263] stderr> 
[14:44:28.263] stderr> 
[14:44:28.264] stderr> No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
[14:44:28.264] stderr> 
[14:44:28.264] stderr> 
[14:44:28.332] stderr> Received disconnect from 10.40.0.33 port 22:2: Too many authentication failures

This is quite confusing for users as they would need to dismiss the popup and scroll through the remote - SSH output to see the URL.

As an example, WinSCP is properly doing both the challenge and the conversation:

working scp user:
image

not working scp user:
winscp_not_working

Do you think it could be possible for vscode to display an extended error message containing the stderr content of the ssh client?
Since sshd is compatible with pam and its pam_conv mechanisms, it could allow for a clearer connection prompting and interactions for users.

Thanks for reading, and hopefully this feature request is interesting enough to be considered.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.