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

ec2: connection fails on older versions of OpenSSH. #6015

Open
Hweinstock opened this issue Nov 14, 2024 · 1 comment
Open

ec2: connection fails on older versions of OpenSSH. #6015

Hweinstock opened this issue Nov 14, 2024 · 1 comment
Labels
bug We can reproduce the issue and confirmed it is a bug. remote-execute SSM, remote-ssh, CodeCatalyst dev env, remote connect service:ec2

Comments

@Hweinstock
Copy link
Contributor

Hweinstock commented Nov 14, 2024

Problem

  • Connection (remove-window) fails when OpenSSH < 7.6
  • Logs from Amazon Linux 2 machine:
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /home/hkobew/.ssh/config
debug1: Reading configuration data /home/hkobew/.ssh/bastions-config
/home/hkobew/.ssh/config line 7: unsupported option "accept-new".

Steps to reproduce the issue

Attempt connection to any EC2 instance from an Amazon Linux Machine with OpenSSH < 7.6.

Expected behavior

System details (run AWS: About and/or Amazon Q: About)

  • OS: Amazon Linux 2
  • Visual Studio Code version: 1.85
  • AWS Toolkit version: 1.85
  • Amazon Q version: 3.33.0
  • OpenSSH 7.4
@Hweinstock Hweinstock added the bug We can reproduce the issue and confirmed it is a bug. label Nov 14, 2024
@Hweinstock
Copy link
Contributor Author

Hweinstock commented Nov 14, 2024

There are two straightforward workarounds.

  1. Manually edit ~/.ssh/config such that StrictHostKeyChecking: no or StrictHostKeyChecking: ask (not preferred).
  2. Update OpenSSH to 7.6+. On amazon linux this can be done via https://gist.github.com/roommen/18cd78d07b0fbc962de4e79c1d468f92

Relevant Links:
ssh config docs: https://linux.die.net/man/5/ssh_config
OpenSSH docs: https://linux.die.net/man/1/ssh

@Hweinstock Hweinstock changed the title ec2: connection fails on old version of OpenSsh. ec2: connection fails on older versions of OpenSSH. Nov 14, 2024
@justinmk3 justinmk3 added service:ec2 remote-execute SSM, remote-ssh, CodeCatalyst dev env, remote connect labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug. remote-execute SSM, remote-ssh, CodeCatalyst dev env, remote connect service:ec2
Projects
None yet
Development

No branches or pull requests

2 participants