Skip to content

Break out stderr and stdout handling#9

Open
svevang wants to merge 1 commit into
mainfrom
fix-warning-banner-breaks-awstunnel
Open

Break out stderr and stdout handling#9
svevang wants to merge 1 commit into
mainfrom
fix-warning-banner-breaks-awstunnel

Conversation

@svevang

@svevang svevang commented Jun 8, 2026

Copy link
Copy Markdown
Member

My local ssh client is giving me an error banner:

** WARNING: connection is not using a post-quantum key exchange algorithm.
** This session may be vulnerable to "store now, decrypt later" attacks.
** The server may need to be upgraded. See https://openssh.com/pq.html`

Because stdout and stderr are being mixed to test key handling, this is causing all kinds of globbing and weirdness when I execute the script.

This PR fixes the case where the messages show up in stderr but the ssh command does not exit.

  • Captures SSH stdout and stderr separately
  • Checks SSH exit status before processing remote environment output
  • Preserves stderr handling for host-key failure recovery
  • Only exports valid PRX_...=... environment lines
  • Avoids unquoted expansion of mixed SSH output
  • Prevents SSH warning banners from being interpreted as shell/export input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant