question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Public key authentication only possible with host key types

See original GitHub issue

Since 9671352bdaaf13f00681866c09332b1e88a113fd, it seems that public key authentication can only succeed if the key type is also a host key type supported by the server.

I believe that the root cause of this is https://github.com/hierynomus/sshj/commit/9671352bdaaf13f00681866c09332b1e88a113fd#diff-521b24d9ed9094555c19f59ffa14e862R235-R239, where the “signature algorithms” (i.e. server_host_key_algorithms per the SSH spec) are used to populate the factory that is later used to send and sign with public keys.

I would think that that the list of KeyAlgorithm factories should rather be populated directly from the config as it does not require negotiation with the server. KeyedAuthMethod.java would then need to be changed to use those factories instead of asking Transport for them.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
hierynomuscommented, Aug 17, 2020

v0.30.0 is released, I still need to update the Release notes, but wanted to let you know.

Op vr 14 aug. 2020 om 12:40 schreef Fabian Henneke <notifications@github.com

:

Thanks for the info (and the work on sshj in general), enjoy your time off!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/hierynomus/sshj/issues/600#issuecomment-674012912, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA4XI6GIBVWEXOPWMPYS5TSAUIC7ANCNFSM4N6APDFA .

0reactions
fmeumcommented, Aug 17, 2020

Thanks for the heads-up!

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is SSH Public Key Authentication?
With SSH, public key authentication improves security considerably as it frees the users from remembering complicated passwords.
Read more >
How To Configure SSH Key-Based Authentication on a Linux ...
The first step to configure SSH key authentication to your server is to generate an SSH key pair on your local computer. To...
Read more >
How to Use Public Key Authentication with SSH - phoenixNAP
The SSH public key authentication has four steps: 1. Generate a private and public key, known as the key pair. The private key...
Read more >
How to Use SSH Public Key Authentication - Linode
Public key authentication with SSH (Secure Shell) is a method in which you generate and store on your computer a pair of cryptographic...
Read more >
How do I force SSH to only allow users with a key to log in?
By default PasswordAuthentication is set to yes, so explicitly commenting it in /etc/ssh/sshd_config and restart sshd has no effect.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found