File: ssh-keygen

package info (click to toggle)
yash 2.60-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,152 kB
  • sloc: ansic: 34,578; makefile: 851; sh: 808; sed: 16
file content (93 lines) | stat: -rw-r--r-- 3,711 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# (C) 2011-2018 magicant

# Completion script for the "ssh-keygen" command.
# Supports OpenSSH 7.7.

function completion/ssh-keygen {

        typeset OPTIONS ARGOPT PREFIX
        OPTIONS=( #>#
        "A; create all types of host keys"
        "a:; specify the number of primality tests performed (with -T)"
        "B; print the bubblebabble digest"
        "b:; specify the number of bits of the key being created"
        "C:; specify the comment of the key"
        "c; change the comment of RSA1 private/public keys"
        "D:; download the RSA public keys from the specified PKCS#11 library"
        "E:; specify the hash algorithm for fingerprint"
        "e; print the key in the portable format"
        "F:; specify the host name to search the known hosts file for"
        "f:; specify the key file to operate on"
        "G:; specify the file to save candidate primes"
        "g; use generic DNS format (with -r)"
        "H; hash the known hosts file"
        "h; create a host certificate when signing a key"
        "I:; specify the key identity used when signing a key"
        "i; print the key in the non-portable format"
        "J:; specify a max number of lines processed (with -T)"
        "j:; specify the start line number (with -T)"
        "K:; specify the file to print the last line number to (with -T)"
        "k; generate a KRL file"
        "L; print the contents of a certificate"
        "l; print the fingerprint of the public key file"
        "M:; specify the memory size in megabytes used when generating candidate moduli"
        "m:; specify the key format (with -e or -i)"
        "N:; specify the new passphrase"
        "n:; specify principals included in a certificate when signing a key"
        "O:; specify a certificate option when signing a key"
        "o; use the new format to save the private key"
        "P:; specify the (current) passphrase"
        "p; change the passphrase of the private key"
        "Q; test if keys have been revoked in a KRL"
        "q; make ssh-keygen quiet"
        "R:; specify the host name to remove from the known hosts file"
        "r:; print the SSHFP fingerprint resource record of the specified host name"
        "S:; specify the start point for generating candidate moduli"
        "s:; specify the CA key file to sign the public key with"
        "T:; test DH group exchange candidate primes"
        "t:; specify the key type"
        "U; use a CA key in ssh-agent (with -s)"
        "u; update a KRL"
        "V:; specify the validity interval of the signed certificate"
        "v; print debugging messages"
        "W:; specify the DH generator"
        "y; extract the public key from the private key"
        "z:; specify the serial number of the certificate"
        ) #<#

        command -f completion//parseoptions
        case $ARGOPT in
        (-)
                command -f completion//completeoptions
                ;;
        ([abMSVz])
                ;;
        (E)
                complete -P "$PREFIX" md5 sha256
                ;;
        ([FR])
                complete -P "$PREFIX" -h
                ;;
        (m) #>>#
                complete -P "$PREFIX" -D 'SSH2 public or private key' RFC4716
                complete -P "$PREFIX" -D 'PEM PKCS8 public key' PKCS8
                complete -P "$PREFIX" -D 'PEM public key' PEM
                ;; #<<#
        (O)
                #TODO
                ;;
        (t)
                complete -P "$PREFIX" dsa ecdsa ed25519 rsa
                ;;
        (W)
                complete 2 3 5
                ;;
        (*)
                complete -P "$PREFIX" -f
                ;;
        esac

}


# vim: set ft=sh ts=8 sts=8 sw=8 et: