Commit 71d8c661 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Merge pull request #1968 from bhcleek/master

do not request a pty
parents f1cef0ba 2184892f
......@@ -302,7 +302,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
SSHAddress: driver.SSHAddress,
SSHConfig: vmwcommon.SSHConfigFunc(&b.config.SSHConfig),
SSHWaitTimeout: b.config.SSHWaitTimeout,
NoPty: b.config.SSHSkipRequestPty,
Pty: !b.config.SSHSkipRequestPty,
},
&vmwcommon.StepUploadTools{
RemoteType: b.config.RemoteType,
......
......@@ -335,7 +335,6 @@ func (d *ESX5Driver) connect() error {
User: d.Username,
Auth: auth,
},
NoPty: true,
}
comm, err := ssh.New(address, sshConfig)
......
......@@ -94,7 +94,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
SSHAddress: driver.SSHAddress,
SSHConfig: vmwcommon.SSHConfigFunc(&b.config.SSHConfig),
SSHWaitTimeout: b.config.SSHWaitTimeout,
NoPty: b.config.SSHSkipRequestPty,
Pty: !b.config.SSHSkipRequestPty,
},
&vmwcommon.StepUploadTools{
RemoteType: b.config.RemoteType,
......
......@@ -35,8 +35,8 @@ type StepConnectSSH struct {
// SSHWaitTimeout is the total timeout to wait for SSH to become available.
SSHWaitTimeout time.Duration
// NoPty, if true, will not request a Pty from the remote end.
NoPty bool
// Pty, if true, will request a Pty from the remote end.
Pty bool
comm packer.Communicator
}
......@@ -140,7 +140,7 @@ func (s *StepConnectSSH) waitForSSH(state multistep.StateBag, cancel <-chan stru
config := &ssh.Config{
Connection: connFunc,
SSHConfig: sshConfig,
NoPty: s.NoPty,
Pty: s.Pty,
}
log.Println("Attempting SSH connection...")
......
......@@ -33,8 +33,8 @@ type Config struct {
// case an error occurs.
Connection func() (net.Conn, error)
// NoPty, if true, will not request a pty from the remote end.
NoPty bool
// Pty, if true, will request a pty from the remote end.
Pty bool
}
// Creates a new packer.Communicator implementation over SSH. This takes
......@@ -65,7 +65,7 @@ func (c *comm) Start(cmd *packer.RemoteCmd) (err error) {
session.Stdout = cmd.Stdout
session.Stderr = cmd.Stderr
if !c.config.NoPty {
if c.config.Pty {
// Request a PTY
termModes := ssh.TerminalModes{
ssh.ECHO: 0, // do not echo
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment