Documentation ¶
Overview ¶
Copyright (c) 2020 Bram Vandenbogaerde * You may use, distribute or modify this code under the * terms of the Mozilla Public License 2.0, which is distributed * along with the source code.
Index ¶
- func PasswordKey(username string, password string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
- func PrivateKey(username string, path string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
- func PrivateKeyWithPassphrase(username string, passpharase []byte, path string, ...) (ssh.ClientConfig, error)
- func SshAgent(username string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PasswordKey ¶
func PasswordKey(username string, password string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
Creates a configuration for a client that authenticates using username and password
func PrivateKey ¶
func PrivateKey(username string, path string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
PrivateKey Loads a private and public key from "path" and returns a SSH ClientConfig to authenticate with the server
func PrivateKeyWithPassphrase ¶
func PrivateKeyWithPassphrase(username string, passpharase []byte, path string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
Creates the configuration for a client that authenticates with a password protected private key
func SshAgent ¶
func SshAgent(username string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
Creates a configuration for a client that fetches public-private key from the SSH agent for authentication
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.