Documentation ¶
Index ¶
- Constants
- Variables
- func NewServer(c *core.Core) *server
- func ParsePrivateKeyFromString(content string) (signer ssh.Signer, err error)
- func ParsePrivateKeyWithPassphrase(privateKey, Passphrase string) (signer ssh.Signer, err error)
- func Run(cfg string, isDaemon bool)
- type SSHClient
- type SSHClientOption
- func SSHClientHost(host string) SSHClientOption
- func SSHClientKeyboardAuth(keyboardAuth gossh.KeyboardInteractiveChallenge) SSHClientOption
- func SSHClientPassphrase(passphrase string) SSHClientOption
- func SSHClientPassword(password string) SSHClientOption
- func SSHClientPort(port int) SSHClientOption
- func SSHClientPrivateAuth(privateAuth gossh.Signer) SSHClientOption
- func SSHClientPrivateKey(privateKey string) SSHClientOption
- func SSHClientProxyClient(proxyArgs ...SSHClientOptions) SSHClientOption
- func SSHClientTimeout(timeout int) SSHClientOption
- func SSHClientUsername(username string) SSHClientOption
- type SSHClientOptions
Constants ¶
View Source
const (
Version = "0.2.3"
)
Variables ¶
Functions ¶
Types ¶
type SSHClient ¶
type SSHClient struct { *gossh.Client Cfg *SSHClientOptions ProxyClient *SSHClient sync.Mutex // contains filtered or unexported fields }
func NewSSHClient ¶
func NewSSHClient(opts ...SSHClientOption) (*SSHClient, error)
func NewSSHClientWithCfg ¶
func NewSSHClientWithCfg(cfg *SSHClientOptions) (*SSHClient, error)
func (*SSHClient) ReleaseSession ¶
type SSHClientOption ¶
type SSHClientOption func(conf *SSHClientOptions)
func SSHClientHost ¶
func SSHClientHost(host string) SSHClientOption
func SSHClientKeyboardAuth ¶
func SSHClientKeyboardAuth(keyboardAuth gossh.KeyboardInteractiveChallenge) SSHClientOption
func SSHClientPassphrase ¶
func SSHClientPassphrase(passphrase string) SSHClientOption
func SSHClientPassword ¶
func SSHClientPassword(password string) SSHClientOption
func SSHClientPort ¶
func SSHClientPort(port int) SSHClientOption
func SSHClientPrivateAuth ¶
func SSHClientPrivateAuth(privateAuth gossh.Signer) SSHClientOption
func SSHClientPrivateKey ¶
func SSHClientPrivateKey(privateKey string) SSHClientOption
func SSHClientProxyClient ¶
func SSHClientProxyClient(proxyArgs ...SSHClientOptions) SSHClientOption
func SSHClientTimeout ¶
func SSHClientTimeout(timeout int) SSHClientOption
func SSHClientUsername ¶
func SSHClientUsername(username string) SSHClientOption
type SSHClientOptions ¶
type SSHClientOptions struct { Host string Port string Username string Password string PrivateKey string Passphrase string Timeout int PrivateAuth gossh.Signer // contains filtered or unexported fields }
func (*SSHClientOptions) AuthMethods ¶
func (cfg *SSHClientOptions) AuthMethods() []gossh.AuthMethod
Click to show internal directories.
Click to hide internal directories.