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

Missing EDCSA keys should be autodetected #130

Closed
rvansa opened this issue Sep 14, 2022 · 9 comments
Closed

Missing EDCSA keys should be autodetected #130

rvansa opened this issue Sep 14, 2022 · 9 comments

Comments

@rvansa
Copy link
Member

rvansa commented Sep 14, 2022

qDup should emit an explanatory message when it cannot connect due to missing EDCSA keys.

@willr3
Copy link
Collaborator

willr3 commented Sep 14, 2022

How did qDup show the error in the current release? I'm not sure how we could add a test case for that

@rvansa
Copy link
Member Author

rvansa commented Sep 14, 2022

11:14:54@rvansa qDup$ jbang ./docs/examples/runQDup.java
11:15:01.164 [main] INFO  io.hyperfoil.tools.qdup.JarMain - Starting with output path = /tmp/qDup4505339498182214548
11:15:01.347 [main] INFO  io.hyperfoil.tools.qdup.JsonServer - listening on port 31337
11:15:01.414 Running qDup version 0.6.2 @ unkonown
11:15:01.417 run-1663146901062 starting state:
 GREETING = Hello qDup!
 USER = rvansa
 HOST = rvansa

11:15:01.424 [main] INFO  i.h.tools.qdup.cmd.Dispatcher - starting 0 scripts
11:15:01.514 [qdup-command-1] INFO  o.a.s.c.u.s.e.EdDSASecurityProviderRegistrar - getOrCreateProvider(EdDSA) created instance of net.i2p.crypto.eddsa.EdDSASecurityProvider
11:15:01.558 [qdup-command-1] INFO  o.a.s.c.i.DefaultIoServiceFactoryFactory - No detected/configured IoServiceFactoryFactory using Nio2ServiceFactoryFactory
11:15:01.565 [qdup-command-1] INFO  o.a.s.c.c.h.DefaultConfigFileHostEntryResolver - resolveEffectiveResolver(rvansa@rvansa:22) loaded 23 entries from /home/rvansa/.ssh/config
11:15:01.772 [qdup-command-1] ERROR io.hyperfoil.tools.qdup.Run - failed to connect rvansa@rvansa:22
11:15:01.773 failed to connect all ssh sessions for run
11:15:01.774 [qdup-command-0] WARN  i.h.tools.qdup.cmd.Dispatcher - ignoring stop call when already stopped

However as I found (#132) it's not the current release.

@rvansa
Copy link
Member Author

rvansa commented Sep 14, 2022

And the current jBang command does not work with 0.6.12...

@willr3
Copy link
Collaborator

willr3 commented Sep 16, 2022

the failed to connect rvansa@rvansa:22 message is meant to point out the issue. I've added

logger.error("failed to connect "+host.getSafeString()
        +(host.hasPassword() ?
            ", verify ssh works with the provided username and password" :
            ", verify password-less ssh works with the selected keys"
        )
);

Is that what you are recommending or is there something else we could add to help users?

@rvansa
Copy link
Member Author

rvansa commented Sep 16, 2022

What are 'selected keys'? If plain ssh rvansa@rvansa:22 works using id_rsa, I would not understand why qDup can't. If qDup requires id_ecdsa it should check if new File(home + ".ssh/id_ecdsa").canRead() and explain that.

@willr3
Copy link
Collaborator

willr3 commented Oct 3, 2022

selected keys means either whatever is the default in ~/.ssh or what is passed in with -i --identity
If ssh rvansa@rvansa:22 works then qDup should also work.

@rvansa
Copy link
Member Author

rvansa commented Oct 4, 2022

I've used an older version of qDup, but in my case just id_rsa always worked with plain ssh but it was not the case with qDup. Shall I remove my id_ecdsa and try with most recent version of qDup?

@willr3
Copy link
Collaborator

willr3 commented Oct 4, 2022

I only have an id_rsa so I am confused what is not working. Please try the most recent qDup and see if you can reproduce the login failure while still being able the ssh without a password.
If you could, do it with either an id_rsa you can share (so not your normal one) or do it with containers in the test suite like SshTestBase does with the getHost() getSession() and createContainer()

@rvansa
Copy link
Member Author

rvansa commented Oct 4, 2022

Okay, I can confirm that while I can reproduce it when running qDup 0.6.2 it is not reproducible with 0.6.12. I guess the userauth_pubkey fix described in https://github.com/Hyperfoil/qDup/blob/master/docs/ssh-config.adoc#11-userauth_pubkey-key-type-ssh-rsa-not-in-pubkeyacceptedalgorithms is not needed anymore.

@rvansa rvansa closed this as completed Oct 4, 2022
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

2 participants