Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


(Serious) key management - Page 2
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

(Serious) key management

2»

Comments

  • jsgjsg Member, Resident Benchmarker
    edited December 2021

    @Daniel15 said:

    @ceter said: There is nothing wrong with using passwords. If done well, using password is probably more secure

    How can a password be more secure, if a password-protected SSH key is essentially a password and a key? 🤔

    That's not how security works.

    At the end of the day it's about x bytes of data, about entropy, about looking pseudo-random. In fact, a e.g. 96-byte random hex-string not only is not worse than a public key but actually better ("more secure"), albeit needlessly better.
    Also the password is just (symmetrically) encrypting the key and does not add to the security of SSH session establishment.

    Side note for those who like to use passwords: make your actual pass phrase (as seen by the server) the hash of what you perceive as your password (and can remember well).
    For example 'Jason1990' (first name + year of birth) is a really sh_tty pass phrase - but easy to remember for Jason - but SHA512('Jason1990') is a quite good pass phrase, especially when a salt is used.

    Thanked by 1plumberg
  • @jsg said:
    Rather than throwing smart "expert" advice at you or joining the discussion I'll try to answer your questions, as well as ones behind those.

    Like Q: Are passphrases unacceptable and one MUST use keys?
    A: No, proper passphrases are fine but keys meet reasonable security standards.
    E.g. SSH keys never are as bad as (too) short and bad pass phrases, hence keys if only for peace of mind.

    @plumberg said:

    • how to safeguard the private keys...

    How to safeguard pass phrases? Both are pieces of data that (a) should stay under your control, (b) should never be lost.
    The answer to (a) is that 'ssh-keygen' (at key pair creation) by default asks for a (not obligatory, can be empty) pass phrase. And the answer to (b) is "make backups", preferably multiple ones stored on multiple devices.

    • how many keys should I create for each idling service

    One

    • should each idling service has its unique set of keys

    Depends on perspective. Some will say that each and every one "must" have, other will say "nuh, one key pair for all of them is fine". I personally am in between. Idlers and systems that have little importance (e.g. name server slave number 4) and hold no confidential or sensitive data can share one key, while others definitely should have each their own key pair.

    • let's say a key is compromised, then how to remediate the same

    (a) largely theory, unless your OpSec is abominable, (b) depends. Just keep your private keys safe and always have backups and you are extremely unlikely to find yourself in that situation in the first place.

    • just like passwords are forced to be reset periodically how can I rotate or reset keys

    By creating new ones and replacing the old ones. But usually, except maybe for key pairs used for multiple machines (like the idlers), there is no need to reset the keys.

    • is there some service which is recommended for key management... if reasonably priced I do not mind paying for it...

    Are you insane? Private keys are exactly that, private. Using a 3rd party service is about as smart as sending your wife/girl friend drunk and nude into a bad neighbourhood.
    You can and should however use a backup service and store your keys properly encrypted there.

    • I understand it's always best practice to have a passphrase for a key... but what happens when we need to automate some tasks where key is needed?

    Then you put that private key, probably an extra one created for that purpose, into your .ssh/config (private one) and into .ssh/authorized_keys of the remote system. For automated/unattended job the key might have no pass-phrase but be sure to use it with a remote user account with only the rights necessary for the task.

    • should root account have a key... Guess not...

    Highly likely not.

    (Windows related stuff: me not qualified to /advisehelp there)

    Thanks for the detailed response. Your thoughts are practical.

  • ezethezeth Member, Patron Provider

    @Ouji said:

    @ezeth said: USA Texas

    Nice. These are actually very good looking prices. Any chance boomer will be back on stock?

    It's back on stock right now

    Thanked by 1plumberg
  • @ezeth said:

    @Ouji said:

    @ezeth said: USA Texas

    Nice. These are actually very good looking prices. Any chance boomer will be back on stock?

    It's back on stock right now

    shows OOS :disappointed:

  • @ceter said:
    The "disable password login" mantra has been repeated so many times only because many people are unable to set strong, not reused passwords.
    The "disable root account" mantra is for reducing the consequences of weak passwords, because that account can not be renamed.

    There is nothing wrong with using passwords. If done well, using password is probably more secure, because you are not a bot, and you will have much less room for error than with key management.

    @plumberg said: I'll end up screwing up badly sooner or later

    You have already forgot to include the backup. Your first point should've really been "how to backup and safeguard the private keys..."

    Disabling password login has the benefit of discouraging brute force attempts that use up resources (RAM, CPU, bandwidth, log spam), etc.

    On a dedicated PC, this isn't so bad. But a shared server with hundreds of accounts getting brute force logins thousands per account per day just wastes resources.

    Thanked by 1vimalware
  • @jsg said:

    @Daniel15 said:

    @ceter said: There is nothing wrong with using passwords. If done well, using password is probably more secure

    How can a password be more secure, if a password-protected SSH key is essentially a password and a key? 🤔

    That's not how security works.

    At the end of the day it's about x bytes of data, about entropy, about looking pseudo-random. In fact, a e.g. 96-byte random hex-string not only is not worse than a public key but actually better ("more secure"), albeit needlessly better.

    You frequently speak in double negatives, is that a Russian thing? That's generally taught in English to be avoided.

    Also the password is just (symmetrically) encrypting the key and does not add to the security of SSH session establishment.

    What? It's an additional requirement of proof of user even before the SSH session begins. Of course it adds to the security.

    Side note for those who like to use passwords: make your actual pass phrase (as seen by the server) the hash of what you perceive as your password (and can remember well).
    For example 'Jason1990' (first name + year of birth) is a really sh_tty pass phrase - but easy to remember for Jason - but SHA512('Jason1990') is a quite good pass phrase, especially when a salt is used.

    And you've just been broken by AI. There was an excellent episode from Vice where they looked at how AI analyses everything about a person, habits, social, mental, etc and tailors the brute force attempts. It was fairly successful in short time.

    The key, though? Won't be brute forced or AI'd.

  • jsgjsg Member, Resident Benchmarker

    @TimboJones said:

    @jsg said:

    @Daniel15 said:

    @ceter said: There is nothing wrong with using passwords. If done well, using password is probably more secure

    How can a password be more secure, if a password-protected SSH key is essentially a password and a key? 🤔

    That's not how security works.

    At the end of the day it's about x bytes of data, about entropy, about looking pseudo-random. In fact, a e.g. 96-byte random hex-string not only is not worse than a public key but actually better ("more secure"), albeit needlessly better.

    You frequently speak in double negatives, is that a Russian thing? That's generally taught in English to be avoided.

    Also the password is just (symmetrically) encrypting the key and does not add to the security of SSH session establishment.

    What? It's an additional requirement of proof of user even before the SSH session begins. Of course it adds to the security.

    Side note for those who like to use passwords: make your actual pass phrase (as seen by the server) the hash of what you perceive as your password (and can remember well).
    For example 'Jason1990' (first name + year of birth) is a really sh_tty pass phrase - but easy to remember for Jason - but SHA512('Jason1990') is a quite good pass phrase, especially when a salt is used.

    And you've just been broken by AI. There was an excellent episode from Vice where they looked at how AI analyses everything about a person, habits, social, mental, etc and tailors the brute force attempts. It was fairly successful in short time.

    The key, though? Won't be brute forced or AI'd.

    As usual you know everything better - and as usual you are dead-wrong.

    For a start, I did not even assert what you "understood". What I said was "does not add to the security of SSH session establishment.". The password for SSH keys does not make SSH more secure but it protects you in case your private key is "stolen".

    Similar for your other point. I explicitly wrote that 'Jason1990' is a sh_tty pass phrase and what I suggested was to actually use a crypto-hash and use its output as the real password - and ( clearly spelled out) preferably with a salt.

    Here is the sha-256 hash of a simple string: "e7d936b6622ffaecf99582b0ece755ce96259e58848647bd5bd2626ba400c3cb"

    Now, ask your AI and tell me the string I hashed. Well noted just 256 (rather than 512 bits as I had suggested) and without a salt so it should be a breeze for your AI.

    TL;DR Don't worry, one can use a good crypto-hash, again, min 256 bit and preferably salted, to get a random looking good entropy, secure password based on an easy to remember (but sh_tty as a pass phrase" "password" like e.g. 'Jason1990'.
    That said, of bloody course, a less sh_tty pass phrase as input is preferable.

  • @jsg said:

    @TimboJones said:

    @jsg said:

    @Daniel15 said:

    @ceter said: There is nothing wrong with using passwords. If done well, using password is probably more secure

    How can a password be more secure, if a password-protected SSH key is essentially a password and a key? 🤔

    That's not how security works.

    At the end of the day it's about x bytes of data, about entropy, about looking pseudo-random. In fact, a e.g. 96-byte random hex-string not only is not worse than a public key but actually better ("more secure"), albeit needlessly better.

    You frequently speak in double negatives, is that a Russian thing? That's generally taught in English to be avoided.

    Also the password is just (symmetrically) encrypting the key and does not add to the security of SSH session establishment.

    What? It's an additional requirement of proof of user even before the SSH session begins. Of course it adds to the security.

    Side note for those who like to use passwords: make your actual pass phrase (as seen by the server) the hash of what you perceive as your password (and can remember well).
    For example 'Jason1990' (first name + year of birth) is a really sh_tty pass phrase - but easy to remember for Jason - but SHA512('Jason1990') is a quite good pass phrase, especially when a salt is used.

    And you've just been broken by AI. There was an excellent episode from Vice where they looked at how AI analyses everything about a person, habits, social, mental, etc and tailors the brute force attempts. It was fairly successful in short time.

    The key, though? Won't be brute forced or AI'd.

    As usual you know everything better - and as usual you are dead-wrong.

    For a start, I did not even assert what you "understood". What I said was "does not add to the security of SSH session establishment.". The password for SSH keys does not make SSH more secure but it protects you in case your private key is "stolen".

    Having your car doors locked is more secure from being stolen from being hotwired than a car with unlocked doors.

    Similar for your other point. I explicitly wrote that 'Jason1990' is a sh_tty pass phrase and what I suggested was to actually use a crypto-hash and use its output as the real password - and ( clearly spelled out) preferably with a salt.

    Here is the sha-256 hash of a simple string: "e7d936b6622ffaecf99582b0ece755ce96259e58848647bd5bd2626ba400c3cb"

    Now, ask your AI and tell me the string I hashed. Well noted just 256 (rather than 512 bits as I had suggested) and without a salt so it should be a breeze for your AI.

    TL;DR Don't worry, one can use a good crypto-hash, again, min 256 bit and preferably salted, to get a random looking good entropy, secure password based on an easy to remember (but sh_tty as a pass phrase" "password" like e.g. 'Jason1990'.
    That said, of bloody course, a less sh_tty pass phrase as input is preferable.

    whoosh you used a predictive algorithm. It isn't trying to get the output, just the inputs and the algorithm and then it can get the output the same way as you.

  • jsgjsg Member, Resident Benchmarker

    @TimboJones said:
    whoosh you used a predictive algorithm. It isn't trying to get the output, just the inputs and the algorithm and then it can get the output the same way as you.

    Yeah right. Because we know from movies what AI is capable of.

    I give up, just continue to extend your "knowledge" via "Vice" and movies ... while I'll stay a mere mortal bound by boring things like math. Have a nice evening.

  • TerokNorTerokNor Member
    edited December 2021

    @TimboJones said: whoosh you used a predictive algorithm. It isn't trying to get the output, just the inputs and the algorithm and then it can get the output the same way as you.

    While this is probable, what @jsg actually means is that you can use the transformed string as the password instead of the initial sh_tty one. In this case you have to remember an easy password and you also need a software to calculate the sha256 each time you want to use it. (except if you have some kind of brain damage and you can remember those 32 bytes)

    Then what is actually stored in the system is a double-hash of the initial sh_tty password, instead of a single hash of a sh_tty password that may be brute-forced with dictionary attacks or other exotic means like what you describe.

    i.e assuming that the system keeps a sha512 hash of the user password, the final hash is

    p = SHA512(SHA256("Jason1990"))

    While it's an interesting trick, I think it's better not to use sh_tty passwords in the first place

  • ArkasArkas Moderator

    Just use an excel sheet and write everything down and encrypt the file.

    Thanked by 1TerokNor
  • NeoonNeoon Community Contributor, Veteran

    Well, firewall the SSH port, use something like wireguard, to access the machine.
    But make sure, your VPN is redundant.

    Use different keys, encrypt stuff.
    So even if someone manages to steal your keys, they still need VPN access.

    If you are that paranoid, enable 2FA on SSH.

    Thanked by 2plumberg Ouji
  • TimboJonesTimboJones Member
    edited December 2021

    @TerokNor said:

    @TimboJones said: whoosh you used a predictive algorithm. It isn't trying to get the output, just the inputs and the algorithm and then it can get the output the same way as you.

    While this is probable, what @jsg actually means is that you can use the transformed string as the password instead of the initial sh_tty one. In this case you have to remember an easy password and you also need a software to calculate the sha256 each time you want to use it. (except if you have some kind of brain damage and you can remember those 32 bytes)

    Then what is actually stored in the system is a double-hash of the initial sh_tty password, instead of a single hash of a sh_tty password that may be brute-forced with dictionary attacks or other exotic means like what you describe.

    I fully understand what jsg is saying. You don't need to brute force the double hashed result and I wasn't saying the attacker would. I'm saying they'll do such a deep psychological dive into you, that they'll think like you. For example, some variation on favourite band or first fuck, etc. Or someone who likes hashing things.

    When crackers are making keygens for expensive software, they're not breaking the encryption, they are stealing the functions/algorithms that take the input and generates valid output.

    For the record, I subscribe to that cartoon's message. Random words, not:

    your password (and can remember well).
    For example 'Jason1990' (first name + year of birth) is a really sh_tty pass phrase - but easy to remember for Jason

    Thanked by 1vimalware
  • jsgjsg Member, Resident Benchmarker

    @TimboJones said:

    @TerokNor said:

    @TimboJones said: whoosh you used a predictive algorithm. It isn't trying to get the output, just the inputs and the algorithm and then it can get the output the same way as you.

    While this is probable, what @jsg actually means is that you can use the transformed string as the password instead of the initial sh_tty one. In this case you have to remember an easy password and you also need a software to calculate the sha256 each time you want to use it. (except if you have some kind of brain damage and you can remember those 32 bytes)

    Then what is actually stored in the system is a double-hash of the initial sh_tty password, instead of a single hash of a sh_tty password that may be brute-forced with dictionary attacks or other exotic means like what you describe.

    I fully understand what jsg is saying. You don't need to brute force the double hashed result and I wasn't saying the attacker would. I'm saying they'll do such a deep psychological dive into you, that they'll think like you. For example, some variation on favourite band or first fuck, etc. Or someone who likes hashing things.

    When crackers are making keygens for expensive software, they're not breaking the encryption, they are stealing the functions/algorithms that take the input and generates valid output.

    For the record, I subscribe to that cartoon's message. Random words, not:

    your password (and can remember well).
    For example 'Jason1990' (first name + year of birth) is a really sh_tty pass phrase - but easy to remember for Jason

    Yeah right, and they'll also do such a deep psychological dive into the random generator, that they'll think like random. Because AI and "Vice".

    And being at it, the AI also will use artificial rainbow tables on arrays of virtual artificial storage of Exa- or even Zeta-Bytes size. Because AI and "Vice".

    And there still are some little issues like hashing results looking like random or like symmetric crypto output but being very different in fact, because encryption by definition is reversible while hashing by definition is irreversible. But hey, that's just math and math means nothing when AI enters the stage!

    There's just one tiny weakness:

    jsg said:
    Here is the sha-256 hash of a simple string: "e7d936b6622ffaecf99582b0ece755ce96259e58848647bd5bd2626ba400c3cb"

    Somehow the AI so far failed to crack this really really (intentionally) simple riddle. And I even committed the (quite grave) sin of not using a salt.

    So, you "modern", "Vice" students, you'll stay with your super AI - and I'll stick with boring math and science.

  • @jsg said:

    @TimboJones said:

    @TerokNor said:

    @TimboJones said: whoosh you used a predictive algorithm. It isn't trying to get the output, just the inputs and the algorithm and then it can get the output the same way as you.

    While this is probable, what @jsg actually means is that you can use the transformed string as the password instead of the initial sh_tty one. In this case you have to remember an easy password and you also need a software to calculate the sha256 each time you want to use it. (except if you have some kind of brain damage and you can remember those 32 bytes)

    Then what is actually stored in the system is a double-hash of the initial sh_tty password, instead of a single hash of a sh_tty password that may be brute-forced with dictionary attacks or other exotic means like what you describe.

    I fully understand what jsg is saying. You don't need to brute force the double hashed result and I wasn't saying the attacker would. I'm saying they'll do such a deep psychological dive into you, that they'll think like you. For example, some variation on favourite band or first fuck, etc. Or someone who likes hashing things.

    When crackers are making keygens for expensive software, they're not breaking the encryption, they are stealing the functions/algorithms that take the input and generates valid output.

    For the record, I subscribe to that cartoon's message. Random words, not:

    your password (and can remember well).
    For example 'Jason1990' (first name + year of birth) is a really sh_tty pass phrase - but easy to remember for Jason

    Yeah right, and they'll also do such a deep psychological dive into the random generator, that they'll think like random. Because AI and "Vice".

    Why mention an RNG where your example of using a known first name and birth year would not be the equivalent of using RNG? whoosh

    And being at it, the AI also will use artificial rainbow tables on arrays of virtual artificial storage of Exa- or even Zeta-Bytes size. Because AI and "Vice".

    Fuck, you're basic. Rather than learn something new, you try and gaslight others instead of just educating yourself. As explained several times, it's not trying to brute force the hashed result. It will build its own tables based on keywords from your life and significantly decrease the attempts at your password.

    And there still are some little issues like hashing results looking like random or like symmetric crypto output but being very different in fact, because encryption by definition is reversible while hashing by definition is irreversible. But hey, that's just math and math means nothing when AI enters the stage!

    Further evidence you don't know wtf is going on. An AI that is trying to login to your SSH server using password is just going to enter the same string as you would. It's guessing what password you might start from and you made that possible by using first name and year. Base it on the serial found on a can of coke one day and AI wouldn't know to add that to the mix.

    There's just one tiny weakness:

    jsg said:
    Here is the sha-256 hash of a simple string: "e7d936b6622ffaecf99582b0ece755ce96259e58848647bd5bd2626ba400c3cb"

    Somehow the AI so far failed to crack this really really (intentionally) simple riddle. And I even committed the (quite grave) sin of not using a salt.

    What AI are you talking about? Like some "AI" trolls the net and randomly checks this forum? What a fucking stupid thing to say.

    So, you "modern", "Vice" students, you'll stay with your super AI - and I'll stick with boring math and science.

    Jsg, you are seriously fucked in the head. You're seriously defending a password based on the person's first name and date of birth. You shouldn't be allowed anywhere near security.

  • jsgjsg Member, Resident Benchmarker

    @TimboJones said:
    [lots of clueless blabla based on Vice "education"]

    Jsg, you are seriously fucked in the head. You're seriously defending a password based on the person's first name and date of birth. You shouldn't be allowed anywhere near security.

    Of bloody course you even failed to really understand what I said.

    Let's keep it simple: you continue your "wooosh" route and I continue my boring math and actually implementing crypto algorithms route.

Sign In or Register to comment.