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

Can you use ed25519 algo and make rsa deprecated #80

Closed
Elrondo46 opened this issue Nov 10, 2021 · 10 comments
Closed

Can you use ed25519 algo and make rsa deprecated #80

Elrondo46 opened this issue Nov 10, 2021 · 10 comments

Comments

@Elrondo46
Copy link

ssh-rsa is the default option for host keys in your tool, can you make ed25519 as default algo. RSA is deprecated in 2021

@shiipou
Copy link
Contributor

shiipou commented Nov 10, 2021

It's just rsa with sha-1 that is deprecated in 2021.
You can safely use SHA-2 rsa algorithm.

@opteamax
Copy link

Unfortunately many clients reject connecting also with SHA-2 rsa with complaining

no matching host key type found. Their offer: ssh-rsa

as this algorithm fell of the clients acceptable connections. Making ed25519 default would also be highly appreciated on our side as we receive many client complaints.

@shiipou
Copy link
Contributor

shiipou commented Feb 22, 2022

Unfortunately many clients reject connecting also with SHA-2 rsa with complaining

no matching host key type found. Their offer: ssh-rsa

as this algorithm fell of the clients acceptable connections. Making ed25519 default would also be highly appreciated on our side as we receive many client complaints.

You can add the following option to your SSH client : -oHostKeyAlgorithms=+ssh-rsa

But if you can't add this option, you can create the file at path $HOME/.ssh/config
and adding the following using your own ip :

Host nas
  HostName 192.168.x.x
  HostKeyAlgorithms=+ssh-rsa

Some client won't take this file but that tell you that's a bad client ^^

@tg123 tg123 reopened this Feb 25, 2022
@tg123
Copy link
Owner

tg123 commented Feb 25, 2022

Unfortunately many clients reject connecting also with SHA-2 rsa with complaining

no matching host key type found. Their offer: ssh-rsa

as this algorithm fell of the clients acceptable connections. Making ed25519 default would also be highly appreciated on our side as we receive many client complaints.

do you mean make -i /etc/ssh/ssh_host_rsa_key default?

@bhperry
Copy link

bhperry commented Mar 9, 2022

Regardless of default, it seems that ssh-rsa is the only accepted host key algorithm for rsa host key. This is causing failures with newer versions of openssh-client (I believe it's anything after 8.8), with the error client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0

Is there a way to configure a different set of allowed algorithms? Have been digging in to see if I can find where this is set, but no luck so far.

Looks to be related to this: golang/go#37278

@bhperry
Copy link

bhperry commented Mar 9, 2022

Poked around in sshpiper.crypto a bit and realized that the primary changes to support SHA256 and SHA512 signing with RSA keys is already merged in from upstream, there just hasn't been a new tag made since 2020.

Tested a build of sshpiper with go.mod pointed to the latest commit of sshpiper.crypto, and confirmed that it does now select SHA512 instead of SHA1 with an RSA host key.

@tg123
Copy link
Owner

tg123 commented Mar 9, 2022

@bhperry latest master is always using latest sshpiper.crypto
which version are you using?

@bhperry
Copy link

bhperry commented Mar 9, 2022

Oh, right you are. Working off of a fork of sshpiper, so we're a bit out of sync with master. Thanks!

@tg123
Copy link
Owner

tg123 commented Mar 10, 2022

@bhperry thanks for confirming. grpc driver would decouple the logic and sshpiper
let me know if it could help to get rid of your private build

@tg123 tg123 closed this as completed Mar 10, 2022
@bhperry
Copy link

bhperry commented Mar 10, 2022

Fork was for something else. These PRs my colleague made
#77
pockost/sshpipe-k8s-lib#1

Would like to merge our forks if you have the time to review. Happy to get up to date with master and reopen the PRs.

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

No branches or pull requests

5 participants