{"modulePath":"github.com/stackpointcloud/packer","version":"v0.10.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package ssh\n\n## Variables\n\n```go\nvar ErrHandshakeTimeout = fmt.Errorf(\"Timeout during SSH handshake\")\n```\nErrHandshakeTimeout is returned from New() whenever we're unable to establish an ssh connection within a certain timeframe. By default the handshake time- out period is 1 minute. You can change it with Config.HandshakeTimeout.\n\n## Functions\n\n```go\nfunc BastionConnectFunc(\n\tbProto string,\n\tbAddr string,\n\tbConf *ssh.ClientConfig,\n\tproto string,\n\taddr string) func() (net.Conn, error)\n```\nBastionConnectFunc is a convenience method for returning a function that connects to a host over a bastion connection.\n\n```go\nfunc ConnectFunc(network, addr string) func() (net.Conn, error)\n```\nConnectFunc is a convenience method for returning a function that just uses net.Dial to communicate with the remote end that is suitable for use with the SSH communicator configuration.\n\n```go\nfunc New(address string, config *Config) (result *comm, err error)\n```\nCreates a new packer.Communicator implementation over SSH. This takes an already existing TCP connection and SSH configuration.\n\n```go\nfunc PasswordKeyboardInteractive(password string) ssh.KeyboardInteractiveChallenge\n```\nAn implementation of ssh.KeyboardInteractiveChallenge that simply sends back the password for all questions. The questions are logged.\n\n## Types\n\n```go\ntype Config struct {\n\t// The configuration of the Go SSH connection\n\tSSHConfig *ssh.ClientConfig\n\n\t// Connection returns a new connection. The current connection\n\t// in use will be closed as part of the Close method, or in the\n\t// case an error occurs.\n\tConnection func() (net.Conn, error)\n\n\t// Pty, if true, will request a pty from the remote end.\n\tPty bool\n\n\t// DisableAgent, if true, will not forward the SSH agent.\n\tDisableAgent bool\n\n\t// HandshakeTimeout limits the amount of time we'll wait to handshake before\n\t// saying the connection failed.\n\tHandshakeTimeout time.Duration\n\n\t// UseSftp, if true, sftp will be used instead of scp for file transfers\n\tUseSftp bool\n}\n```\nConfig is the structure used to configure the SSH communicator.\n\n","path":"github.com/stackpointcloud/packer/communicator/ssh","name":"ssh","synopsis":"","isRedistributable":true}
