Skip to main content
136 votes
Accepted

How to check if an SSH private key has passphrase or not?

The keyfile will have a different header if it is password protected. Here's the top of a key without a passphrase: -----BEGIN RSA PRIVATE KEY----- MIIEogIBAAKCAQEA3qKD/...
gowenfawr's user avatar
  • 73.2k
117 votes

How to check if an SSH private key has passphrase or not?

It is not always so easy as described in the other answers. It works only with the old PEM keys. New openssh format of the keys (generated with -o option, more secure, since openssh-6.5) looks the ...
Jakuje's user avatar
  • 5,989
41 votes

Password manager: safer on laptop or on smartphone?

I don't understand why you don't want a password manager that works on both? Your non-tech friends that don't use a password manager yet are too limited by your requirements. You seem to be running in ...
SPRBRN's user avatar
  • 7,549
38 votes

Is it insecure to display the number of characters when users enter a new passphrase?

Knowing how long a password is doesn't really make much difference to how easy it is to guess or crack it. If the password is something easily guessable or in a dictionary, then the length is ...
Gh0stFish's user avatar
  • 14.7k
33 votes
Accepted

ssh-keygen: What is the passphrase for?

$ man ssh-keygen [...] It is possible to specify a passphrase when generating the key; that passphrase will be used to encrypt the private part of this file using 128-bit AES. So this passphrase just ...
Luc's user avatar
  • 33.1k
22 votes

Song Lyrics as passphrases

As with any password guessability/strength question, likely the most important factor is "who's the attacker". For online password guessing attacks, by an attacker who doesn't know you, the most ...
Rory McCune's user avatar
  • 62.5k
22 votes

Diceware as a passphrase for online accounts

The reason why you need a strong password for an online service is in case their database is compromised, and the attacker gets hold of the password hashes. Then the attacker can indeed make a ...
Mike Scott's user avatar
  • 10.3k
19 votes

Song Lyrics as passphrases

Sorry, but you're not the first person to think of this so you can bet that this technique will be automated in some password cracking software. It's always best to assume that the hacker knows your ...
Gareth Charnock's user avatar
18 votes

How to check if an SSH private key has passphrase or not?

The "RSA key" is actually a set of values stored as an ASN.1 structure in the standardized DER binary format, then encoded in base-64 to get the final PEM file. A very easy way to determine whether a ...
WhiteWinterWolf's user avatar
14 votes
Accepted

Is there a better Diceware word list?

While the Diceware passphrase generation system is sound, you aren't the first person to express concerns about the default wordlist. The nice thing is that you can create your own wordlist that ...
PwdRsch's user avatar
  • 8,446
14 votes
Accepted

Checking if an RSA private key is passphrase protected

Just open it, if it's encrypted it will begin with -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: AES-128-CBC,0F5C7993DCFA4C0962CE249CFD854B91 if it is not it will begin directly ...
Sefa's user avatar
  • 1,752
12 votes

How to check if an SSH private key has passphrase or not?

Private keys should be secured, trying to set the password just declares if it is yet password protected. With ssh-keygen on the protected key: ~/.ssh$ ssh-keygen -p -f id_rsa_password_protected ...
santiagopim's user avatar
12 votes

Is it insecure to display the number of characters when users enter a new passphrase?

UIs with this behavior do exist. I've seen several that do not offer any visual feedback. I've also seen a few that do random feedback. Is it a security issue? Well, consider how long passwords ...
Cort Ammon's user avatar
  • 9,436
11 votes
Accepted

Passphrase vs. password entropy

Two general points. First, the benefit of Passphrases is that they make it easier for users to generate entropy while still remembering their key. Generating entropy through randomized characters is ...
Kevin's user avatar
  • 892
10 votes

Can a dictionary attack crack a Diceware passphrase?

I think the easiest way to convince yourself of the security of Diceware is not to get hung up on the dictionary and instead focus on the dice rolls. The idea of Diceware, seen from this angle, is ...
Luis Casillas's user avatar
10 votes

How to check if an SSH private key has passphrase or not?

While the other answers give valid answers to achieve this manually, the following approach can be used within a shell script for automation. The following command's exit code determines whether the ...
Felix's user avatar
  • 201
9 votes

How secure is a password made up of three or four three-letter words?

I would have to disagree that his claim of three 'three-letter' word is secure. In his article he says: So - 500 x 500 x 500 = 125,000,000 (one hundred and twenty five million) possibilities. Maybe ...
nd510's user avatar
  • 1,748
9 votes

Is it insecure to display the number of characters when users enter a new passphrase?

The threat scenario is extremely limited. One would have to be physically present and be able to count the "dots" to get a length. This is more difficult than being able to read the text ...
schroeder's user avatar
  • 132k
8 votes

ssh-keygen: What is the passphrase for?

Here's the answer I was looking for myself, and could not find until I experimented with both having and not having a passphrase: When the private key is encrypted, then you have to enter the ...
CrashNeb's user avatar
  • 181
7 votes

Is there a better Diceware word list?

In addition to the EFF lists which PwdRsch mentions in his answer, you can look for word lists from a literary corpus such as the Corpus of Contemporary American English, the Brown Corpus, or the Moby ...
Ben's user avatar
  • 4,052
7 votes

Password manager: safer on laptop or on smartphone?

Disclosure: I work for AgileBits, the makers of 1Password. Passphrase generator on mobile Not a single smartphone password manager allows generating passphrases 1Password does on iOS, though not ...
Jeffrey Goldberg's user avatar
7 votes
Accepted

Details of a good WPA2 pre-shared key (password)?

Contrary to the originally accepted answer, a random multiword passphrase is not subject to what we usually mean when we say "dictionary attack" (that's when you just throw a large wordlist at a hash, ...
Royce Williams's user avatar
7 votes

Diceware as a passphrase for online accounts

The purpose of passphrases is to have a strong authentication factor that is easy to remember. If you use a password manager you don't need to be able to remember your passwords, so in most cases you ...
reed's user avatar
  • 15.9k
7 votes
Accepted

Static RAM: Detecting presence and wiping?

To answer your question I'm going to need to lay some groundwork. Both SRAM and DRAM are volatile memory technologies, meaning that when you power them off they lose state. SRAM stands for Static ...
Polynomial's user avatar
  • 136k
6 votes

Is there a better Diceware word list?

The creator of Diceware addresses some of these issues in the FAQ. Look up the obscure words in a dictionary; this will help you remember them. The short non-words are there to keep the passphrase ...
Graham Hill's user avatar
  • 15.6k
6 votes

Expiration / enforce change of passphrase for private ssh keys

Something that looks sort of like what you want is using an SSH user CA, which allows you to set a lifetime on the signed key. Whatever automation you put around key signing can refuse to sign for ...
Mark's user avatar
  • 61
6 votes

How resiliant is a private key passphase to brute force attacks?

Here is a benchmark of hashcat on a NVidia RTX 4090. It lists these speeds for OpenSSH private keys: Hash-Mode 22911: 4382.6 MH/s (61.07ms) @ Accel:128 Loops:512 Thr:32 Vec:1 Hash-Mode 22921: 15080....
Sjoerd's user avatar
  • 33.4k
5 votes

Is a passphrase-protected SSH private key susceptible to a dictionary attack?

This is an old question, but in case someone comes across this looking for answers, things have since changed: -o Causes ssh-keygen to save private keys using the new OpenSSH format ...
user371366's user avatar
5 votes
Accepted

"Just add a word or two" advice

They mean create a new passphrase with more words in it. The main reason for this is that reuse, even if it is just to add something on the end, dramatically improves the chances an attacker will be ...
Rory Alsop's user avatar
  • 61.5k
5 votes
Accepted

Time to crack passphrase of 4 English word combinations at 7 terahashes/sec

If you are choosing four items from a set of 171,476, you have a keyspace of 171,4764. 7 TH/s is 7×1012 per second, so 171,4764 / 7×1012 ≈ 1.24×108 seconds to search the entire keyspace. The average ...
forest's user avatar
  • 67.1k

Only top scored, non community-wiki answers of a minimum length are eligible