Documentation ¶
Index ¶
Constants ¶
View Source
const DEFAULT_KEY_LENGTH = 2048
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "keygen", Short: "Genetate SSH private key", Aliases: []string{"gen", "g", "key", "keygen"}, Args: cobra.NoArgs, Run: func(c *cobra.Command, args []string) { var pub string var priv string var err error length := DEFAULT_KEY_LENGTH if FlagUseGo { pub, priv, err = ssh_utils.MakeSSHKeyPair() if err != nil { log.Fatalln(err) } fmt.Println(priv) fmt.Println(pub) } else { if FlagECDSA { pub, priv, err = ssh_utils.MakeSSHKeyPairSSHKeyGenECDSA() } else { pub, priv, err = ssh_utils.MakeSSHKeyPairSSHKeyGen(length) } if err != nil { log.Fatalln(err) } fmt.Println(priv) fmt.Println(pub) } }, }
View Source
var FlagECDSA bool
View Source
var FlagUseGo bool
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.