ssh

package
v0.0.0-...-42fb9ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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 AddKeySshAgent(keyPath string) error

func CopyToRemote

func CopyToRemote(username string, privateKeyPath string, remoteServerIP string, filePath string, saveFolderPath string) error

func CreateRSAKeyPair

func CreateRSAKeyPair(keyName string) ([]byte, []byte)

func GetPrivateKeyBytes

func GetPrivateKeyBytes(key *rsa.PrivateKey) []byte

func GetPublicKeyBytes

func GetPublicKeyBytes(privateKeyName string) []byte

func GetPublicKeyFromPrivateKey

func GetPublicKeyFromPrivateKey(privateKeyName string) ssh.PublicKey

func MarshalPublicKey

func MarshalPublicKey(publicKey interface{}) []byte

func ParsePrivateKey

func ParsePrivateKey(keyName string) *rsa.PrivateKey

func RemoveKeySshAgent

func RemoveKeySshAgent(keyPath string) error

func WriteKey

func WriteKey(fileName string, keyBytes []byte, permissions fs.FileMode) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL