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

Improve user feedback for SSH profiles. #1447

Closed
ferdinandyb opened this issue Feb 1, 2024 · 1 comment · Fixed by #1496
Closed

Improve user feedback for SSH profiles. #1447

ferdinandyb opened this issue Feb 1, 2024 · 1 comment · Fixed by #1496
Assignees
Labels
enhancement New feature or request feature-request User requested features

Comments

@ferdinandyb
Copy link
Contributor

Abstract

If you start contour with an ssh profile, and the server is unreachable contour only gives some feedback on STDOUT and exists, the application itself is not started. If you launch contour without being attached to a terminal, you only see that nothing is happening. It would be better if contour started up and printed the error message. It might even be better, if in case the ssh profile is NOT the default profile, that contour would instead try to load the default profile. Also, a setting would be nice that would limit the amount of output on a successful connection.

Motivation

The current STDOUT feedback is on an unsuccessful connection is:

[2024-02-01 12:05:03.1052916.105291] [ssh] Starting SSH session to host: bferdinandy@192.168.17.227:2222
[2024-02-01 12:05:03.1056046.105604] [ssh] () State transition from Initial to Started.
[2024-02-01 12:05:03.1057534.105753] [ssh] () State transition from Started to Connect.
[error] Failed to connect to 192.168.17.227:2222 (No such file or directory)

You don't see this when starting from the GUI, say an i3 shortcut or a windows shortcut.

A successful connection on the other hand has a lot of mostly unnecessary information:

🔑  Starting SSH session to host: bferdinandy@192.168.17.227:2222
🔑  Connected to 192.168.17.227:2222
🔑  Host key verification succeeded ([redact]).
🔑  Could not authenticate with SSH agent with identity: cardno:[redact]
🔑  Failed to authenticate with SSH agent. No more identities available.

🔑  Successfully authenticated with private key.
🔑  Failed to set SSH environment variable "COLORTERM". Request denied
🔑  Failed to set SSH environment variable "TERMINAL_NAME". Request denied
🔑  Failed to set SSH environment variable "TERMINAL_VERSION_STRING". Request denied
🔑  Failed to set SSH environment variable "TERMINAL_VERSION_TRIPLE". Request denied

Specification

  • When SSH profile is started, the application window should be opened at the latest when the "Starting SSH session to host: bferdinandy@192.168.17.227:2222" is printed. Note that on a successful connection, this is the first line that is shown in the terminal, so it's sort of already there.
  • If the connection is unsuccessful, the "Failed to connect to 192.168.17.227:2222 (No such file or directory)" should be printed in red (side note: why is this a no file/dir error?).
  • Optionally, if the connection is unsuccessful, and the SSH profile is not the default profile, the default profile should be loaded instead.
@ferdinandyb ferdinandyb added enhancement New feature or request feature-request User requested features labels Feb 1, 2024
@Yaraslaut
Copy link
Member

Conencted to #1326 and #1327

Also, some of the ssh logs must be moved into debug flags, with only two left as info for the user:

🔑  Starting SSH session to host: bferdinandy@192.168.17.227:2222
🔑  Connected to 192.168.17.227:2222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature-request User requested features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants