SSH How To Create Public/Private Key Pair and with a Larger Keysize than 2048 bits

The problem is that by default ssh-keygen loves to generate an easy to crack 2048 bit key (RSA).  Supposedly having a larger keysize helps such as 4096 or 8096 but it is thought to be useless still against Quantum computing.

How can I check my existing keysize and type?

ssh-keygen -lf /path/to/your/id_rsa.pub

The output will be something like below followed by the hash.  The first number is the key size and the second part will be the type eg RSA, SHA256 etc..

2048 RSA

How can I create an ssh key?

-t = the type of key

-b = the key size (you probably shouldn't use that many 9s!)

ssh-keygen -t ed25519 -b 9999999999999

How can I see what types of keys my ssh version supports?

Don't use dsa it is weak and now deprecated in the latest ssh versions and many recommend ed25519 (EdDSA)

ssh-keygen -t
option requires an argument -- t
usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa | rsa1]


Tags:

ssh, larger, keysize, bitsthe, default, keygen, generate, rsa, quantum, computing, existing, lf, id_rsa, pub, output, hash, eg, sha, etc, shouldn, supports, dsa, deprecated, versions, eddsa, requires, usage, bits, ecdsa,

Latest Articles

  • Convert and install to LUKS Encrypted Drive Ubuntu 18.04 19.10 Linux Mint and Debian Based Linux
  • Debian and Netplan
  • CentOS 8 how to restart the network!
  • CentOS 8 how to convert to a bootable mdadm RAID software array
  • ADATA USB Thumb Drive Issues
  • KMODE EXCEPTION NOT HANDLED - QEMU/KVM Won't Boot Windows 2016 or 10 Image or Physical Machine
  • Linux Mint / Ubuntu / Debian Mate Disable Guest Session and Hide Usernames on Lightdm Login screen GUI
  • SSH How To Create Public/Private Key Pair and with a Larger Keysize than 2048 bits
  • selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service geckodriver
  • python ModuleNotFoundError: No module named 'bs4' even though you have the module
  • ssh how to connect using a SOCKS 5 proxy with nc and proxycommand
  • Enable AMDGPU Linux Driver
  • apache symlinks denied even with followsymlinks
  • chown how to change ownership on a symlink
  • how to use ifplugd in Linux to execute a command or script when a NIC cable is unplugged or plugged in
  • dd how to backup and restore disk images including compression with gzip
  • mpv / mplayer with Radeon / AMD GPU Video Card Driver enable VDPAU GPU Accelerated Video Decoding
  • Wordpress Reset Blog User Password from MySQL Using Linux Bash and not PHPMyadmin
  • Ubuntu Linux Mint Debian xorg performance and tear-free tuning for AMD Radeon Based Cards
  • Centos 7 Stopped and Disabled Firewalld and ports still blocked