温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.ssh.com/academy/ssh/passphrase-generator
点击访问原文链接

How to Generate a Strong Passphrase?

How to Generate a Strong Passphrase? Skip to content Products Show submenu for Products Products PrivX Privileged Access and Secrets Management Privileged Access Management Secure Remote Access for OT SSH Key Manager Tectia Secure File Transfer SSH Server SSH Client SSH Server for z/OS Encryption NQX Quantum-Safe Encryption FQX File Encryptor SalaX Secure Collaboration Secure Mail Secure Messaging Solutions Show submenu for Solutions Solutions Zero Trust Zero Trust Secrets Management Secrets Management Just-in-Time / Ephemeral Access Just-in-Time / Ephemeral Access Vendor Remote Access Vendor Remote Access Operational Technology Operational Technology Audit and Compliance Audit and Compliance Quantum Readiness Quantum Readiness Identity Security Identity Security Secure Collaboration Secure Collaboration Cloud Access Management /Hybrid Cloud Cloud Access Management /Hybrid Cloud Secure File Transfer Secure File Transfer Resources Show submenu for Resources Resources Content Library Blog SSH Academy Press Releases Case Studies Report a Vulnerability Company Show submenu for Company Company About Us Partners Investors Careers Customer Support Products Show submenu for Products Products PrivX Privileged Access and Secrets Management Privileged Access Management Secure Remote Access for OT SSH Key Manager Tectia Secure File Transfer SSH Server SSH Client SSH Server for z/OS Encryption NQX Quantum-Safe Encryption FQX File Encryptor SalaX Secure Collaboration Secure Mail Secure Messaging Solutions Show submenu for Solutions Solutions Zero Trust Zero Trust Secrets Management Secrets Management Just-in-Time / Ephemeral Access Just-in-Time / Ephemeral Access Vendor Remote Access Vendor Remote Access Operational Technology Operational Technology Audit and Compliance Audit and Compliance Quantum Readiness Quantum Readiness Identity Security Identity Security Secure Collaboration Secure Collaboration Cloud Access Management /Hybrid Cloud Cloud Access Management /Hybrid Cloud Secure File Transfer Secure File Transfer Resources Show submenu for Resources Resources Content Library Blog SSH Academy Press Releases Case Studies Report a Vulnerability Company Show submenu for Company Company About Us Partners Investors Careers Customer Support Get in touch
Passphrase Generator Using Basic Shell Commands

People often ask about passphrase generators. Basically, how to generate a strong passphrase. Many web sites also offer passphrase generation. However, the problem with online sites is that you can never fully trust them, unless the way they generate passwords can be fully audited. Surprisingly many of them even send the generated passwords in plain text HTTP over the Internet for anyone to see!

Even when the communication is HTTPS-protected, it is impossible to know how the passwords are generated on the server side and whether they are stored. There could be a man-in-the-middle attack being performed on the connection. Such attacks are surprisingly common, and routinely performed by intelligence agencies using fakes certificates. Some malware and adware - even ones pre-installed on Windows laptops in the case of the Lenovo Superfish scandal - also spy on encrypted web traffic. Furthermore, web browsers cache pages, and you don't really want your passphrase to remain in a cache file for weeks, do you?

Contents Browser-based online password generator Generating passphrase on the command line Shell commands to generate passphrases How complex does a passphrase need to be? SSH keys should be managed Browser-based online password generator

We offer an online random password generator that is entirely browser-based. Unlike other password generators, there is no server component that needs to be trusted. The password does not end up in caches. That is the only online password/passphrase generator we can recommend.

Generating passphrase on the command line

It is also easy to generate random passwords and passphrase on the command line. This can be done with basic Unix commands. The generated passphrases are too complex to remember, but are very useful for applications where passphrases are needed for protecting machine keys and for SSH key management. The same commands can be used to generate passwords.

The basic idea is to read from /dev/urandom, a device that produces high-quality cryptographically secure pseudo-random data. The device works by collecting entropy for interrupt timings, device latencies, keypresses, packet timings, and on some systems, hardware randomness sources. It then uses strong cryptographic hash functions to produce a continuous random stream from this data. On many systems, randomness is also carried on across reboots using a random seed file. The output is then formatted to something user-readable.

Shell commands to generate passphrases

Any of the following commands can be used, depending on what tools are installed in the particular operating system:

 dd if=/dev/urandom bs=16 count=1 2>/dev/null | base64 | sed 's/=http://g'

This generates a passphrase with 128 bits of entropy. The output looks like this:

q4fZq185VKt7LgdNSP5W7A

An alternative to using the base64 command (which may not be available) is to use something like sha256sum (or md5sum, sha1sum, etc) to generate a passphrase that is hex. Something like the following would work:

 dd if=/dev/urandom bs=32 count=1 2>/dev/null | sha256sum -b | sed 's/ .*//'

This generates a passphrase with 256 bits of entropy. The output looks like this:

3ed04c7f887dc04fe11ad1f58f0473c88edf966502d66aff43a3583569c945de
How complex does a passphrase need to be?

If you are looking for a password or passphrase that you can remember, you can take characters from the beginning of the output. Generally, at least 15 characters would be recommended to prevent password brute-forcing attacks. In 2012, any eight-character Windows password could be broken by hobbyists in a few hours. Even most 16-character passwords can be easily cracked. For hexadecimal passwords, you should multiply password lengths by 1.5.

Passphrases for keys should be substantially longer than passwords. We recommend having 128 bits of entropy in the passphrase. At least 80 bits is essential. This means 20 hex digits or 14 base-64 digits at the minimum.

SSH keys should be managed

As a reminder, if you have any significant number of servers, make sure to manage your keys properly. They are access credentials that need provisioning and termination processes. See Universal SSH Key Manager for more information.

Solutions Zero Trust Secrets Management Just-in-Time/ Ephemeral Access Vendor Remote Access Operational Technology Audit and Compliance Quantum Readiness Identity Security Cloud Access Management/Hybrid Cloud Secure Collaboration Secure File Transfer Industries Healthcare Government MSPs Products PrivX Privileged Access and Secrets Management Privileged Access Management (PAM) Secure Remote Access for OT SSH Key Management Encryption NQX Quantum-Safe Encryption FQX File Encryption Tectia Secure File Transfer SSH Server SSH Client SSH Server for z/OS SalaX Secure Collaboration Secure Mail Secure Messaging Company About Us Partners Investors Careers Resources Talk to a security expert Support Product documentation Contact Us

Privacy Policy  |  Terms and Conditions

2026 © Copyright SSH

How to Generate a Strong Passphrase?,AI智能索引,全网链接索引,智能导航,网页索引

    Passphrase generator using shell commands - generates strong random passphrases.