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

Unable to connect to ubuntu 22.04 using ssh-rsa #7764

Closed
1 task done
veochen-octopus opened this issue Sep 8, 2022 · 7 comments
Closed
1 task done

Unable to connect to ubuntu 22.04 using ssh-rsa #7764

veochen-octopus opened this issue Sep 8, 2022 · 7 comments
Assignees
Labels
kind/bug This issue represents a verified problem we are committed to solving p2 state/backlog On the backlog (2/4)

Comments

@veochen-octopus
Copy link

veochen-octopus commented Sep 8, 2022

Team

  • I've assigned a team label to this issue

Severity

potentially blocking

Version

any

Latest Version

I could reproduce the problem in the latest build

What happened?

RSA keys working when manually connecting but not working inside Octopus, throwing userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth].

ssh-rsa is disabled in openssh 8.8+ which Ubuntu 22.04 ships with. Our SSH client seems to be affected by this. There's a workaround as well as a PR we could look at bringing in.

Reproduction

  • Create a Ubuntu 22.04 instance
  • Create an RSA key pair (or download directly from AWS)
  • Add pub key to instance
  • Do a manual ssh connection <- This works
  • Add private key to Octopus
  • Add instance as an SSH target and do a health check <- This fails

Error and Stacktrace

Sep  7 18:20:42 ip-172-31-8-76 sshd[196978]: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]
Sep  7 18:20:42 ip-172-31-8-76 sshd[196978]: Connection closed by authenticating user ubuntu 52.250.93.133 port 3136 [preauth]

More Information

Customer ticket - https://octopus.zendesk.com/agent/tickets/95925
Internal discussion - https://octopusdeploy.slack.com/archives/CNHBHV2BX/p1662589109899939
SSH.NET Upstream discussion - sshnet/SSH.NET#956

Workaround

Possible workarounds (not always possible)

  • use an older version of ubuntu
  • use a different key type, e.g. ed25519
@veochen-octopus veochen-octopus added kind/bug This issue represents a verified problem we are committed to solving state/triage p2 state/backlog On the backlog (2/4) and removed state/triage labels Sep 8, 2022
@okarpov
Copy link

okarpov commented Apr 17, 2023

How you can specify different key type using the username+password authentication method?

@octoreleasebot
Copy link

Release Note: Updated the library used for SSH. This provides improved compatibility with support for newer algorithms (unblocking support for OpenSSH Server 8.8+). SSH targets can now use SHA256 fingerprints for host verification. When adding new SSH targets, Octopus Server will use SHA256 fingerprinting by default.

@davisowb
Copy link

davisowb commented May 7, 2024

@rhysparry Any chance this fix is going to be released in 2024.1 too? we are seeing the same for our self hosted Octopus with Amazon linux 2023 but cannot upgrade to the released version because as far as I can see 2024.2 is not yet available for self hosted?

@rhysparry
Copy link

Hi @davisowb, there are no plans to backport this to 2024.1. The change involved migrating from an old fork of SSH.NET to the current released version. Given the significance of this change, we elected to minimise the risk to existing versions of Octopus by applying it to the next version. 2024.2 should be available for self-hosted customers in the next couple of months.

Octopus Tentacle is also an option.

@lucyjspence
Copy link

Hi @davisowb I'm a Product Manager at Octopus and I'm currently looking at SSH targets. Don't suppose you'd be up for a chat would you? If you are, I'd love to understand a bit more about how you use them and why you use SSH. Please book some time in here: https://calendly.com/lucyspence/15-minute-meeting-clone

@davisowb
Copy link

davisowb commented May 8, 2024

@rhysparry - Makes sense, I'd forgotten tentacle was an option. Thanks for the quick response!

@Octobob
Copy link
Member

Octobob commented May 16, 2024

🎉 The fix for this issue has been released in:

Release stream Release
2024.2 2024.2.6856
2024.3+ all releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This issue represents a verified problem we are committed to solving p2 state/backlog On the backlog (2/4)
Projects
None yet
Development

No branches or pull requests

8 participants