Documentation ¶
Index ¶
- func SSHToIntanceThroughBastion(bastion, target, user string) error
- type Client
- func Dial(network, addr string, config *ssh.ClientConfig) (*Client, error)
- func DialWithJumpHost(client *Client, addr string, user string) (*Client, error)
- func DialWithKey(addr, user, keyfile string) (*Client, error)
- func DialWithKeyWithPassphrase(addr, user, keyfile string, passphrase string) (*Client, error)
- func DialWithPasswd(addr, user, passwd string) (*Client, error)
- func DialWithSSHAgent(addr, user string) (*Client, error)
- func (c *Client) Close() error
- func (c *Client) Cmd(cmd string) *remoteScript
- func (c *Client) Dial(network, addr string) (net.Conn, error)
- func (c *Client) Script(script string) *remoteScript
- func (c *Client) ScriptFile(fname string) *remoteScript
- func (c *Client) Shell() *remoteShell
- func (c *Client) Terminal(config *TerminalConfig) *remoteShell
- type TerminalConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func Dial ¶
func Dial(network, addr string, config *ssh.ClientConfig) (*Client, error)
Dial starts a client connection to the given SSH server. This is wrap the ssh.Dial
func DialWithJumpHost ¶
DialWithJumpHost access host buy through jumper
func DialWithKey ¶
DialWithKey starts a client connection to the given SSH server with key authmethod.
func DialWithKeyWithPassphrase ¶
DialWithKeyWithPassphrase same as DialWithKey but with a passphrase to decrypt the private key
func DialWithPasswd ¶
DialWithPasswd starts a client connection to the given SSH server with passwd authmethod.
func DialWithSSHAgent ¶
DialWithSSHAgent same as DialWithKey but retrieval private key through ssh-agent
func (*Client) Shell ¶
func (c *Client) Shell() *remoteShell
Shell create a noninteractive shell on client.
func (*Client) Terminal ¶
func (c *Client) Terminal(config *TerminalConfig) *remoteShell
Terminal create a interactive shell on client.
type TerminalConfig ¶
type TerminalConfig struct { Term string Hight int Weight int Modes ssh.TerminalModes }
Click to show internal directories.
Click to hide internal directories.