[GH-ISSUE #3744] Problems connecting to Amazon Linux 2023 instances #2573

Closed
opened 2026-02-27 00:53:28 +03:00 by kerem · 7 comments
Owner

Originally created by @jmoleiro on GitHub (Jan 3, 2025).
Original GitHub issue: https://github.com/electerm/electerm/issues/3744

Electerm Version and download file extension(Electerm版本和下载文件后缀)

electerm-1.51.18-win-x64-installer.exe

Platform detail (平台详情)

Microsoft Windows NT 10.0.22621.0 x64

What steps will reproduce the bug?(重新问题的详细步骤)

We tried to connect to an AWS Instance running Amazon Linux 2023. We already connect to another Amazon Linux 2 instance with the same user and keyfile without problems, but when we try to connect we get, first a prompt to enter a password (the account connect only with keyfile not password), and when we click ignore, we get the error

error: All configured authentication methods failed

What should have happened?(期望的结果)

On the Amazon Linux 2 Instances we can connect correctly and see the prompt, but with Amazon Linux 2023 instances, we instead receive an error.

Would this happen in other terminal app(是否能够在其他同类软件重现这个问题)

Tried to connect with Termius and with WindTerm and we can without problems to this instance

Additional information(其他任何相关信息)

Maybe the problem is this change AWS made on the AL2023 distrbution: Default SSH server configuration

Originally created by @jmoleiro on GitHub (Jan 3, 2025). Original GitHub issue: https://github.com/electerm/electerm/issues/3744 ### Electerm Version and download file extension(Electerm版本和下载文件后缀) electerm-1.51.18-win-x64-installer.exe ### Platform detail (平台详情) Microsoft Windows NT 10.0.22621.0 x64 ### What steps will reproduce the bug?(重新问题的详细步骤) We tried to connect to an AWS Instance running Amazon Linux 2023. We already connect to another Amazon Linux 2 instance with the same user and keyfile without problems, but when we try to connect we get, first a prompt to enter a password (the account connect only with keyfile not password), and when we click ignore, we get the error ```error: All configured authentication methods failed``` ### What should have happened?(期望的结果) On the Amazon Linux 2 Instances we can connect correctly and see the prompt, but with Amazon Linux 2023 instances, we instead receive an error. ### Would this happen in other terminal app(是否能够在其他同类软件重现这个问题) Tried to connect with Termius and with WindTerm and we can without problems to this instance ### Additional information(其他任何相关信息) Maybe the problem is this change AWS made on the AL2023 distrbution: [Default SSH server configuration](https://docs.aws.amazon.com/linux/al2023/ug/ssh-host-keys-disabled.html)
kerem 2026-02-27 00:53:28 +03:00
Author
Owner

@zxdong262 commented on GitHub (Jan 4, 2025):

Thank you for the feedback, seems related to https://github.com/electerm/electerm/blob/master/src/app/server/ssh2-alg.js, maybe adjust serverHostKey orders would work, but I do not have a instance to test it, can you download https://github.com/electerm/electerm/releases/download/v1.51.18/electerm-1.51.18-win-x64-loose.tar.gz, and modify the app/server/ssh2-alg.js to have a test?

<!-- gh-comment-id:2570146356 --> @zxdong262 commented on GitHub (Jan 4, 2025): Thank you for the feedback, seems related to https://github.com/electerm/electerm/blob/master/src/app/server/ssh2-alg.js, maybe adjust serverHostKey orders would work, but I do not have a instance to test it, can you download https://github.com/electerm/electerm/releases/download/v1.51.18/electerm-1.51.18-win-x64-loose.tar.gz, and modify the app/server/ssh2-alg.js to have a test?
Author
Owner

@zxdong262 commented on GitHub (Jan 4, 2025):

I tested with ec2 free tier Amazon Linux 2023 instance, created a ed25519.pem, I tried, could login successfully with this key file, what is the difference of my test process with yours?

<!-- gh-comment-id:2570200551 --> @zxdong262 commented on GitHub (Jan 4, 2025): I tested with ec2 free tier Amazon Linux 2023 instance, created a ed25519.pem, I tried, could login successfully with this key file, what is the difference of my test process with yours?
Author
Owner

@catsxp commented on GitHub (Jan 10, 2025):

同错误 退回 1.51.3 正常
Ubuntu 24.04.1 LTS 正常
Amazon Linux 2023 异常
登录选项 使用私钥 无法成功登录(书签里测试通过)
会提示输入密码

<!-- gh-comment-id:2582170815 --> @catsxp commented on GitHub (Jan 10, 2025): 同错误 退回 1.51.3 正常 Ubuntu 24.04.1 LTS 正常 Amazon Linux 2023 异常 登录选项 使用私钥 无法成功登录(书签里测试通过) 会提示输入密码
Author
Owner

@catsxp commented on GitHub (Jan 10, 2025):

Mac 与 Win 平台,都一样的错误

<!-- gh-comment-id:2582180889 --> @catsxp commented on GitHub (Jan 10, 2025): Mac 与 Win 平台,都一样的错误
Author
Owner

@catsxp commented on GitHub (Jan 10, 2025):

ssh-rsa
使用 rsa 登录密钥测试,应该可以复现该问题,大概率是[ssh2-alg.js]问题
fb728393a80d9a6ca3dbbd04352b6c87fe254518

<!-- gh-comment-id:2582190449 --> @catsxp commented on GitHub (Jan 10, 2025): ssh-rsa 使用 rsa 登录密钥测试,应该可以复现该问题,大概率是[ssh2-alg.js]问题 [fb728393a80d9a6ca3dbbd04352b6c87fe254518](https://github.com/electerm/electerm/commit/fb728393a80d9a6ca3dbbd04352b6c87fe254518)
Author
Owner

@jmoleiro commented on GitHub (Jan 10, 2025):

I tested with ec2 free tier Amazon Linux 2023 instance, created a ed25519.pem, I tried, could login successfully with this key file, what is the difference of my test process with yours?

Maybe you have created a ED25519 key instead of a RSA one? If you do that you can connect without problems, I've tried it.

But we have several servers with AL2023 with RSA keys and we have a problem connecting. The weird thing is that using other clients we can connect without problems.

<!-- gh-comment-id:2582892651 --> @jmoleiro commented on GitHub (Jan 10, 2025): > I tested with ec2 free tier Amazon Linux 2023 instance, created a ed25519.pem, I tried, could login successfully with this key file, what is the difference of my test process with yours? Maybe you have created a ED25519 key instead of a RSA one? If you do that you can connect without problems, I've tried it. But we have several servers with AL2023 with RSA keys and we have a problem connecting. The weird thing is that using other clients we can connect without problems.
Author
Owner

@zxdong262 commented on GitHub (Jan 11, 2025):

Would fix in next release

<!-- gh-comment-id:2585060350 --> @zxdong262 commented on GitHub (Jan 11, 2025): Would fix in next release
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/electerm#2573
No description provided.