Skip to content

Instantly share code, notes, and snippets.

@ulif
Created January 15, 2016 08:59
Show Gist options
  • Select an option

  • Save ulif/a05d6feeeeef724622e5 to your computer and use it in GitHub Desktop.

Select an option

Save ulif/a05d6feeeeef724622e5 to your computer and use it in GitHub Desktop.

Revisions

  1. ulif created this gist Jan 15, 2016.
    15 changes: 15 additions & 0 deletions generate-moduli.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/bin/bash
    #
    # Create primes for use with ssh.
    #
    for bitlen in 2048 3072 4096 6144 8192 ;
    do
    echo Looking for candidates: $bitlen bits. ;
    ssh-keygen -G moduli-${bitlen}.candidates -b $bitlen ;
    cat moduli-${bitlen}.candidates >> moduli.candidates
    rm moduli-${bitlen}.candidates
    done ;
    echo Testing all candidates... ;
    ssh-keygen -T moduli.strong -f moduli.candidates ;
    rm moduli.candidates
    echo Done. Result in moduli.strong ;