Private key field in the SSH Key secure note

Tell us what features would make LastPass even better and vote for features that are most important to you

Moderators: admin, anatoly_LP, chantieLP, JoeSiegrist, robyn

Re: Private key field in the SSH Key secure note

Postby jamesdh » Mon Mar 18, 2019 11:01 am

PublicDana Wrote:In the LP secure note, the Private Key field only shows the first line -- and only the first part of the first line, of course. It's a relatively small-looking field.


It shows more than the first line. It depends entirely on how large you have the LP Vault window sized. What the original poster meant was that it shows the key without the line breaks that a private key typically contains (e.g. it's now one continuous line). LP appears to replace line breaks with simple spaces. On some simpler text editors that will still appear as line breaks due to word wrapping. But they're not. It's just editor wrapping

PublicDana Wrote:And if you press the field's "copy" button, you only get the first line of the key. Just like everyone has said. However. If you go old-school -- put your cursor somewhere in the field, press CTRL*-A (select all), then press CTRL*-C (copy) -- then you get the whole darned thing.


I just double checked, and I get the entire key with both methods on OSX, and the private key is still incorrectly formatted.

https://www.dropbox.com/s/gfpyvz8kd2uxy ... M.png?dl=0

The above linked photo is from an example key I just made to make it clearer what I mean. The top portion is the key pasted in from LP. It's the same regardless of copy method. It wraps on spaces and certain characters like "/", but that's entirely dependent on the editor. If I turn off word wrapping, it's one continuous line. Notice how "-----BEGIN RSA PRIVATE KEY-----" is in the same line as the actual key? That's not supposed to be there.

The bottom is the correct formatting. It's copied directly from the key. Big difference.

And FYI, I've filed a ticket w/ LastPass support and supposedly they are aware of this issue, but time will tell...
jamesdh
 
Posts: 10
Joined: Fri Nov 24, 2017 5:49 pm

Re: Private key field in the SSH Key secure note

Postby PublicDana » Tue Mar 19, 2019 4:49 pm

How very odd.

After I read your reply, I imported my PuTTY-generated private key into NotePad++, turned word-wrap off, and then truncated the portions that show the actual keys.

(For each key -- public and private -- I kept the first letter of the key's first line, inserted an ellipsis, and then deleted the rest of that line and all other lines but the last line. Then I inserted an ellipsis at the beginning of the last line, and deleted all of its text except for the very last letter. I did not delete the line break at the end of the first line, and I did not introduce one.)

You can see the result below.

PuTTY-User-Key-File-2: ssh-rsa
Encryption: aes256-cbc
Comment: imported-openssh-key
Public-Lines: 6
A...
...X
Private-Lines: 14
M...
...F
Private-MAC: e...f


Then I opened my Secure SSH Key Note, put my editing cursor in the Private key field, and "selected all". Then I "copied" the selected text, created a new blank note in NotePad, and pasted that copy into this new note (wordwrap still off). I then truncated the portions that show the actual keys, in the same way as before.

Here's what that looks like:

PuTTY-User-Key-File-2: ssh-rsa
Encryption: aes256-cbc
Comment: imported-openssh-key
Public-Lines: 6
A...
...X
Private-Lines: 14
M...
...F
Private-MAC: e...f

Is LastPass treating keys generated by PuTTY in one way, and keys generated by another application in another way? I don't know.

How odd.
PublicDana
 
Posts: 3
Joined: Fri Jun 24, 2016 7:50 pm

Re: Private key field in the SSH Key secure note

Postby jamesdh » Sat Mar 23, 2019 1:33 pm

You said you are on Windows, so I'm guessing it's a difference of clients (I'm on OSX).

Is LastPass treating keys generated by PuTTY in one way, and keys generated by another application in another way?


No, it's just simple text.
jamesdh
 
Posts: 10
Joined: Fri Nov 24, 2017 5:49 pm

Re: Private key field in the SSH Key secure note

Postby PublicDana » Sun Mar 24, 2019 2:46 pm

jamesdh Wrote:You said you are on Windows, so I'm guessing it's a difference of clients (I'm on OSX).
(Nods) That could make sense.

For those who might be wondering how their configurations differ from yours and mine -- for what it might be worth, I was (am) using LastPass for Windows in my FireFox 66.0.1 browser, on my Dell XPSL702X laptop, whose OS I have upgraded from its original Windows 7 to Windows 10. I have a Premium Account.

My LP FireFox toolbar extension is version 4.26.0.

For what that might be worth. (Shrug)
PublicDana
 
Posts: 3
Joined: Fri Jun 24, 2016 7:50 pm

SSH Key support is broken

Postby azphpguru » Tue Jul 09, 2019 5:47 pm

When I store a "Note" of type "SSH Key" I paste the private key into the very tiny slot for that field. EXAMPLE:

Code: Select All Code
-----BEGIN RSA PRIVATE KEY-----
MIIREDACTEDCAQEAmVdBLFQOC0KhtPqxREDACTED8ZOwjvk8GmoSVKcW0doMlqTXplmxKmn5TuCm
8qQJREDACTEDSYAMwWxEJmRo7ljYfUu+DREDACTEDBee3br0CwDQ1Uk0rfrociVunczO75YhdL6w
3qNntREDACTEDkESEV/qnphPhGYXdxRSzCREDACTEDx2GkqgbxSJBBRKRkDk4HWj3G+eRqeKlAfB
gEF8PJREDACTEDWHiw+hpMdOXZvzTnmeuYcREDACTED3qfScsNmxcf2IZDqTB+zv7QPZADTx2U2X
PWeOrg5REDACTEDisNMrhKzL3z7iX9NsEQT9REDACTED3Poznn59UwIDAQABAoIBAQCQ5r01kHB8
/4gjp0o/REDACTEDmLedQ7QiGd4clJCh2XVP3REDACTED+pdOTlJzO1r2OzKw3xQFmr3VMHJrdTi
dp6NOEfuZREDACTEDbPIP+RhiXHOOxFG3vVM+EREDACTEDOwyIoGuU9ElLYXVOz9hGv4czUYjUGH
EZpW8qOTPFREDACTEDKNrkRcfS5PvqBlyKw4ScMREDACTEDoDGHb/RxoWRpDEjFmjWqx1GlIzxxG
TikBssaVUGDREDACTED9mklkBCpqMx9N/jyBLD09REDACTEDWV5Q7YVD3uceAXbG4anGDfiMdZ6N
ctnP+llIOdi1REDACTEDUD7sOO2hAoGBANiuO135IREDACTED5QKzf/2qa6qjU+3UsHtE75A3ot6
5BvaJdR4CrLevREDACTED050wcORGIV+8cmFEHCDAdREDACTEDtHcW49GqmMOyEm2zrbgYsXNAiH
bOjH+cLS3jYaK8REDACTEDhbWg9VD45taBiWaAFCrv6REDACTEDbAoGBALUqnK2k53Ut9ylKjZ3n
6txLgI0Biro5l2TREDACTEDUcuDcuIPZtwhfJb8jYbqdREDACTEDO4nhSo8YxT6h4HVhJQmh33bi
9BmNj0N57Bl0qoIREDACTED3kKajFtxPXQaC3BzkjL5KiREDACTED7Fyjsa0QhZjIwU4UnxEfFLp
AoGAaGhUDO0NcHzrdREDACTEDTbi/loKK34/b1hoagVh9rREDACTEDxJc3Umo3CG14VbOafC8hRJ
R5IquZrXmA9YaK0TRUREDACTEDZHQaljmI7bllnM6xOsK+vREDACTEDcnd8wdZgZKO+UCcuS8s5e
55dKUIaw6OKT5ekBnQuREDACTEDTB5rVkpDNejqQF8iwYYAGREDACTED+zWv29NJx4dZjKRUglrP
XrsfIf9xCGJnm9NywyQWREDACTEDgl2VqqNNMRsW2+4BKu3BEREDACTEDQVIDl3UUKIj6VlEZ7Ur
BxsaZ/x+/HLcOjBW6gGLyREDACTEDsm2WEuBbN0dOIRmoQKBgHREDACTEDCFc4Gz/4ZlffB+MUMG
/2ADDkVszHDQGzDfmXjUKyREDACTEDxxP0Y/MXfWwQ4PRsWeS5BREDACTEDTWEOkO87BY3U6+7wL
arVamTXTtdeRk69DtXW2UzvREDACTEDsNgOGIpUAwQQXVlr2L50VREDACTEDBXaHIjmG
-----END RSA PRIVATE KEY-----


Now when I copy it and paste it on another system:

Code: Select All Code
-----BEGIN RSA PRIVATE KEY-----

MIIREDACTEDCAQEAmVdBLFQOC0KhtPqxREDACTED8ZOwjvk8GmoSVKcW0doMlqTXplmxKmn5TuCm
8qQJREDACTEDSYAMwWxEJmRo7ljYfUu+DREDACTEDBee3br0CwDQ1Uk0rfrociVunczO75YhdL6w
3qNntREDACTEDkESEV/qnphPhGYXdxRSzCREDACTEDx2GkqgbxSJBBRKRkDk4HWj3G+eRqeKlAfB
gEF8PJREDACTEDWHiw+hpMdOXZvzTnmeuYcREDACTED3qfScsNmxcf2IZDqTB+zv7QPZADTx2U2X
PWeOrg5REDACTEDisNMrhKzL3z7iX9NsEQT9REDACTED3Poznn59UwIDAQABAoIBAQCQ5r01kHB8
/4gjp0o/REDACTEDmLedQ7QiGd4clJCh2XVP3REDACTED+pdOTlJzO1r2OzKw3xQFmr3VMHJrdTi
dp6NOEfuZREDACTEDbPIP+RhiXHOOxFG3vVM+EREDACTEDOwyIoGuU9ElLYXVOz9hGv4czUYjUGH
EZpW8qOTPFREDACTEDKNrkRcfS5PvqBlyKw4ScMREDACTEDoDGHb/RxoWRpDEjFmjWqx1GlIzxxG
TikBssaVUGDREDACTED9mklkBCpqMx9N/jyBLD09REDACTEDWV5Q7YVD3uceAXbG4anGDfiMdZ6N
ctnP+llIOdi1REDACTEDUD7sOO2hAoGBANiuO135IREDACTED5QKzf/2qa6qjU+3UsHtE75A3ot6
5BvaJdR4CrLevREDACTED050wcORGIV+8cmFEHCDAdREDACTEDtHcW49GqmMOyEm2zrbgYsXNAiH
bOjH+cLS3jYaK8REDACTEDhbWg9VD45taBiWaAFCrv6REDACTEDbAoGBALUqnK2k53Ut9ylKjZ3n
6txLgI0Biro5l2TREDACTEDUcuDcuIPZtwhfJb8jYbqdREDACTEDO4nhSo8YxT6h4HVhJQmh33bi
9BmNj0N57Bl0qoIREDACTED3kKajFtxPXQaC3BzkjL5KiREDACTED7Fyjsa0QhZjIwU4UnxEfFLp
AoGAaGhUDO0NcHzrdREDACTEDTbi/loKK34/b1hoagVh9rREDACTEDxJc3Umo3CG14VbOafC8hRJ
R5IquZrXmA9YaK0TRUREDACTEDZHQaljmI7bllnM6xOsK+vREDACTEDcnd8wdZgZKO+UCcuS8s5e
55dKUIaw6OKT5ekBnQuREDACTEDTB5rVkpDNejqQF8iwYYAGREDACTED+zWv29NJx4dZjKRUglrP
XrsfIf9xCGJnm9NywyQWREDACTEDgl2VqqNNMRsW2+4BKu3BEREDACTEDQVIDl3UUKIj6VlEZ7Ur
BxsaZ/x+/HLcOjBW6gGLyREDACTEDsm2WEuBbN0dOIRmoQKBgHREDACTEDCFc4Gz/4ZlffB+MUMG
/2ADDkVszHDQGzDfmXjUKyREDACTEDxxP0Y/MXfWwQ4PRsWeS5BREDACTEDTWEOkO87BY3U6+7wL
arVamTXTtdeRk69DtXW2UzvREDACTEDsNgOGIpUAwQQXVlr2L50VREDACTEDBXaHIjmG

-----END RSA PRIVATE KEY-----


Note new lines inserted where they shouldn't be. When the end user makes this their private key, they get an "Invalid Format" from SSH.
azphpguru
 
Posts: 1
Joined: Tue Jul 09, 2019 5:39 pm

Previous

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 21 guests