1

I have a question about ssh key, I want to know if is better to set password for ssh key or not? which one is more secure?

yasin
  • 13

1 Answers1

2

If you do NOT put password to your SSH Private Key - then anyone who managed to copy it - can use it. Whether this is considered secure (enough) or not is up to you.

If you put password to your SSH Private Key - then if someone managed to copy your key, they will need your passphrase/password before they can use it. Consider it like a 2 factor authentication - you need both the SSH Privatey Key AND your Password/Passphrase - before it is usable.

I personally believe that putting password/passphrase into SSH key to be more secure, but depends on how you define security or what you believe to be secure.

Darius
  • 5,644