Documentation
¶
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)
使用用户名和密码进行身份验证
func PrivateKey ¶
func PrivateKey(username string, path string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
PrivateKey 从"path"加载私钥和公钥,并返回SSH ClientConfig以向服务器进行身份验证
func PrivateKeyWithPassphrase ¶
func PrivateKeyWithPassphrase(username string, passpharase []byte, path string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
为使用受密码保护的私钥进行身份验证
func SshAgent ¶
func SshAgent(username string, keyCallBack ssh.HostKeyCallback) (ssh.ClientConfig, error)
SSH代理获取用于身份验证的公钥和私钥
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.