Documentation ¶
Index ¶
- Constants
- func AddKeySshAgent(keyPath string) error
- func CopyToRemote(username string, privateKeyPath string, remoteServerIP string, filePath string, ...) error
- func CreateRSAKeyPair(keyName string) ([]byte, []byte)
- func GetPrivateKeyBytes(key *rsa.PrivateKey) []byte
- func GetPublicKeyBytes(privateKeyName string) []byte
- func GetPublicKeyFromPrivateKey(privateKeyName string) ssh.PublicKey
- func MarshalPublicKey(publicKey interface{}) []byte
- func ParsePrivateKey(keyName string) *rsa.PrivateKey
- func RemoveKeySshAgent(keyPath string) error
- func WriteKey(fileName string, keyBytes []byte, permissions fs.FileMode) error
Constants ¶
View Source
const DEFAULT_KEY string = "id_rsa"
View Source
const PRIVATE_KEY_FILE_MODE uint32 = 0600
View Source
const SSH_FOLDER_FILE_MODE uint32 = 0700
Variables ¶
This section is empty.
Functions ¶
func AddKeySshAgent ¶
func CopyToRemote ¶
func CreateRSAKeyPair ¶
func GetPrivateKeyBytes ¶
func GetPrivateKeyBytes(key *rsa.PrivateKey) []byte
func GetPublicKeyBytes ¶
func MarshalPublicKey ¶
func MarshalPublicKey(publicKey interface{}) []byte
func ParsePrivateKey ¶
func ParsePrivateKey(keyName string) *rsa.PrivateKey
func RemoveKeySshAgent ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.