Documentation ¶
Index ¶
- Variables
- func GenerateFNSSHKey(bits int) (err error)
- func GenerateFingerPrint(content string) (fingerPrint string, err error)
- func GeneratePrivateKey(bits int) (privateKey *rsa.PrivateKey, err error)
- func GeneratePublicKey(privateKey *rsa.PrivateKey) (err error)
- func ProbeConnection(ip string, maxRetries int) error
- func PublicKeyFile(file string) ssh.AuthMethod
- func WritePEM(path string, content []byte, filePermission os.FileMode, ...) (err error)
- type FakeServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // KeysDir is the directory where keys are stored KeysDir = "./.gofn/keys" // PrivateKeyName is the default name of private key PrivateKeyName = "id_rsa" // PublicKeyName is the default name of public key PublicKeyName = "id_rsa.pub" // Port is the default ssh port Port = ":22" )
Functions ¶
func GenerateFingerPrint ¶
GenerateFingerPrint based content
func GeneratePrivateKey ¶
func GeneratePrivateKey(bits int) (privateKey *rsa.PrivateKey, err error)
GeneratePrivateKey for SSH
func GeneratePublicKey ¶
func GeneratePublicKey(privateKey *rsa.PrivateKey) (err error)
GeneratePublicKey for SSH
Types ¶
type FakeServer ¶
type FakeServer struct { Cmd string Reply string ConnDelay time.Duration ExecDelay time.Duration ExitStatus int // contains filtered or unexported fields }
FakeServer SSH
Click to show internal directories.
Click to hide internal directories.