-
-
Notifications
You must be signed in to change notification settings - Fork 276
[Bug] Remember ssh key passphrase #875
Comments
Please do not remove the issue template when reporting bugs, it makes things harder than they need to be :( |
I just automated 50 sync operations and was never prompted for my passphrase, please update the issue with reliable reproduction steps as mentioned in the bug report template. |
Not OP, but probably related: |
That's very helpful, thanks! |
@moppman Do you know how you generated your key? I cannot reproduce this with a key with no passphrase generated directly within Password Store, but it might very well happen with imported key files in other formats. |
@FabianHenneke I generated my key via |
Okay, I should be able to reproduce this then. Which key type are you using and when did you generate the key approximately (this year, five years ago,...)? |
The key is a 4096 bit RSA key from Feb. 2018. |
Same for me. 4096 bit RSA key generated about 3 years ago. |
Could you test whether #880 fixes this for you? @msfjarvis and I did not catch this during testing since we were using key files generated either in the app or with a current version of OpenSSH. OpenSSH changed the default key file format in late 2018 and the new key files do no longer use an empty string as passphrase if they are not encrypted, but indicate this directly. |
I just generated a new ssh key with the following command:
and imported it on the app. This solved the problem for me! Though I think it isn't perfect that version 1.9 breaks the Remember-Feature for 4096bit RSA SSH keys. |
It does break it only for RSA SSH key files generated before 2019. @msfjarvis If the fix solves the problem, should we publish it as a point release? |
Yeah I think we should. Please create a 1.9.1 milestone and move this issue and the PR to it. |
I tried to test this with RSA2048 and RSA4096 keys from OpenSSH 6.6.1p1, but I've still not received a passphrase prompt yet. Is there a specific set of flags I must pass to
|
I managed to reproduce the issue by passing in |
Is this going to fix the empty password problem only or will it also work with old ssh keys with a password? I don't know exactly when I generated my old ssh key and the openssh version I used 😕 |
I'm not sure either tbh. Care to find out? Snapshot build |
Nope. It does not. I just reimported the old ssh key on the new snapshot version and I'm still prompted for a password. |
That's a bummer. If you can provide some details (like key type and size) then hopefully @FabianHenneke would be able to dig up something. |
I would be particularly interested in reproduction steps. Does the issue really only show up after the third refresh gesture? |
Hmmm. As I said it is 4096Bit rsa key generated about 2 or 3 years ago with I just generated a new 4096 bit rsa key and this is how it looks:
This is how my old rsa key looks like:
The fourth line in the old ssh-key private file is an empty line. Just before the random data starts. |
It always shows up after the second refresh gesture. Reproduction steps:
How reproducable is this? Does clearing cache and data make a difference? With the new generated rsa key I'm not prompted for a password. |
I just managed to reproduce this error with a new key. |
I can reproduce the issue with these steps and will investigate. Thanks! @msfjarvis In passing: The "wrong passphrase" indicator overlaps the new "view password" toggle button. Maybe there is some other Material style visualization for errors? |
@Schueni1 @msfjarvis The root cause is this line in the decoder for the old-style private key file format. It clears the buffer that holds the passphrase bytes and we are currently passing this buffer by reference. The decoder for new-style private key files doesn't clear the buffer. To fix this, I will pass a copy of the buffer. I have also submitted hierynomus/sshj#609 to ensure that sshj wipes as much as possible. |
Something else is broken too, though. Will have to take a deeper look. |
I'll get that sorted. |
* Use remembered credential even if it is empty Should fix #875. * .isNull() --> == null * Update relnotes Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Reword relnotes Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * 2019 it is Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
|
@Schueni1 Could you verify whether the issue is fixed in the current snapshot build? We merged the PR that should fix it. |
Yes it works! I'm not prompted for a passphrase any more. |
Great, I'll prep 1.9.1 |
App Version: 1.9
Since version 1.9 the "Remember passphrase" feature for the ssh key is not working anymore.
After pulling down two or three times to synchronise the remote git repo I get asked for the ssh passphrase.
The text was updated successfully, but these errors were encountered: