Open galderz opened 1 year ago
Side note: I'm not sure the ssh java client is being used right. The ssh client does read the ~/.ssh/config
so why do you need to look for a default identity file? I ask because once I fix the config file, I see this hidden exception in the same place:
java.io.FileNotFoundException: ${HOME}/.ssh/id_rsa (No such file or directory)
My .ssh/config
has all it needs to connect to the machine and this proven by the fact that I can just do ssh <machine>
and it works (no passwords asked no nothing).
You're right, we need to do a better job of raising exceptions to the user. We had hoped to raise meaningful error messages rather than the underlying java exceptions but that is clearly incomplete so instead we will log the exception message as error to console.
We do not have testing to verify use of /.ssh/
config outside of what exists on our laptops. We added the ability to specify a different identity file but reading from /.ssh/config
needs to be improved.
Do you mind sharing the config that caused the error (redacted of course) so I can recreate it and try to create an automated test around it?
What caused the error is in the description. One of the host entries had a line with User galderz,infinispan
which failed. You can only have one user.
SSH java client library exceptions can be hidden behind debug messages which hinders qDup's usage. Example:
I was able to ssh the host in the command line without any issues but qDup didn't like it:
Nothing in the above was hinting at the real issue. It's not clear how to enable debug/trace so I stuck the debugger and there's an actual exception coming from ssh java library hidden by:
With the debugger I discovered that the error is actually this:
The issue is this line that goes back quite a while in my ssh config but crucially is defined in a server that I have not touched in a long long time. Unless you're connecting to that server, I don't think the ssh java client should bother at all (just like command line ssh):
But what it's true is that qDup should be showing these things and not hiding them behind not by default logging levels.