|
|
|
|
@ -37,6 +37,9 @@ type Config struct {
|
|
|
|
|
|
|
|
|
|
// Pty, if true, will request a pty from the remote end.
|
|
|
|
|
Pty bool
|
|
|
|
|
|
|
|
|
|
// DisableAgent, if true, will not forward the SSH agent.
|
|
|
|
|
DisableAgent bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Creates a new packer.Communicator implementation over SSH. This takes
|
|
|
|
|
@ -287,6 +290,11 @@ func (c *comm) connectToAgent() {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if c.config.DisableAgent {
|
|
|
|
|
log.Printf("[INFO] SSH agent forwarding is diabled.")
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// open connection to the local agent
|
|
|
|
|
socketLocation := os.Getenv("SSH_AUTH_SOCK")
|
|
|
|
|
if socketLocation == "" {
|
|
|
|
|
|