microsoft / microsoft/vscode-remote-release
Feature request: SSH Connection error message pop up: Display stderr content
Nobody has claimed this yet.
- 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:
(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.
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:
not working scp user:
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.