func (c *Client) GenerateKeyPair(pass string) ([]byte, []byte, error) {
	out, err := c.PostJSON(c.Endpoint("keypair"), generateKeyPairReq{Password: pass})
	if err != nil {
		return nil, nil, trace.Wrap(err)
	}
	var kp *generateKeyPairResponse
	if err := json.Unmarshal(out.Bytes(), &kp); err != nil {
		return nil, nil, err
	}
	return kp.PrivKey, []byte(kp.PubKey), err
}
// GenerateKeyPair generates SSH private/public key pair optionally protected
// by password. If the pass parameter is an empty string, the key pair
// is not password-protected.
GenerateKeyPair generates SSH private/public key pair optionally protected
by password. If the pass parameter is an empty string, the key pair
is not password-protected.
// GenerateKeyPair generates SSH private / public key pair optionally protected // by password . If the pass parameter is an empty string the key pair // is not password - protected .
func (c *Client) GenerateKeyPair(pass string) ([]byte, []byte, error) {
	out, err := c.PostJSON(c.Endpoint("keypair"), generateKeyPairReq{Password: pass})
	if err != nil {
		return nil, nil, trace.Wrap(err)
	}
	var kp *generateKeyPairResponse
	if err := json.Unmarshal(out.Bytes(), &kp); err != nil {
		return nil, nil, err
	}
	return kp.PrivKey, []byte(kp.PubKey), err
}
func ( c * Client ) GenerateKeyPair ( pass string ) ( [ ] byte , [ ] byte , error ) { out , err := c . PostJSON ( c . Endpoint ( " " ) , generateKeyPairReq { Password : pass } ) if err != nil { return nil , nil , trace . Wrap ( err ) } var kp * generateKeyPairResponse if err := json . Unmarshal ( out . Bytes ( ) , & kp ) ; err != nil { return nil , nil , err } return kp . PrivKey , [ ] byte ( kp . PubKey ) , err }
GenerateKeyPair generates SSH private/public key pair optionally protected
by password.
GenerateKeyPair generates SSH private / public key pair optionally protected by password .