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