Commit Graph

124 Commits

Author SHA1 Message Date
Josh Soref fc99dc25ae spelling: error 2018-03-13 07:45:13 +00:00
Matthew Hooker a4123eabe3
prevent 0-value ticker during ssh keepalive 2018-02-12 10:45:53 -08:00
Matthew Hooker ff64ccda55
Merge pull request #5426 from hashicorp/fix_4915
Fix 4915
2018-02-05 14:54:27 -08:00
Matthew Hooker 63f1673909
ssh deadlines 2018-01-31 12:35:25 -08:00
Matthew Hooker cab52872f4
add session level keep-alives for ssh communicator 2018-01-30 22:00:37 -08:00
Matthew Hooker ebe995c0ff
run goimports 2018-01-22 17:21:10 -08:00
Paul Kilar d9b404fa00 SOCKS5 proxy support 2017-10-10 15:04:15 +01:00
Megan Marsh a79d5eff4e implement sftp path 2017-10-05 10:44:18 -07:00
Megan Marsh 93bddb3e65 implement directory fix for lxc file uploads 2017-10-04 13:35:15 -07:00
Megan Marsh b3cc90125d ssh communicator works 2017-10-03 16:36:27 -07:00
Megan Marsh a5e6134819 implement dir check for ssh communicator 2017-10-03 15:55:32 -07:00
Megan Marsh 4e8303f3b4 Merge pull request #5024 from rickard-von-essen/issue-4941
ssh: Renamed ssh_disable_agent to ssh_disable_agent_forwarding
2017-08-28 11:55:26 -07:00
Matthew Hooker ea76b5a693
Show scp output on error 2017-08-10 11:46:38 -07:00
Rickard von Essen 4f6010aa26
ssh: Renamed ssh_disable_agent to ssh_disable_agent_forwarding
Closes: #4941
2017-06-19 16:26:18 +02:00
Roger Shimizu 28ee60d216 handle ABI change of golang-golang-x-crypto-dev
That ABI change was due to CVE security fix

Fix is picked from upstream of golang-golang-x-crypto-dev:
  e4e2799dd7

Closes: #861282
2017-05-14 23:54:04 +09:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker eab4730c29
communicator/ssh: don't return error if we can't close connection. 2017-03-30 02:14:49 -07:00
Matthew Hooker cc11ec3566
check for a couple errors 2017-03-28 20:36:21 -07:00
Matthew Hooker 35578d9ed1
remove unnecessary type conversions 2017-03-28 20:36:21 -07:00
Matthew Hooker 79287d7e47
simplify some code 2017-03-28 20:36:20 -07:00
Matthew Hooker ce259c126a
communicator/ssh: fix nil ptr error
fixes a case where we could return a nil error and nil ssh session.
2017-03-20 14:30:53 -07:00
Vasiliy Tolstov 00ebe9e1d3 various fixes
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-11-29 14:55:44 +03:00
Matthew Hooker d920b3fbf4 run gofmt 2016-11-01 14:08:04 -07:00
Matthew Hooker 892d5e82c9 expect_disconnect option
provisioner/shell: Adds option to fail if the remote server disconnects
us.
2016-10-21 11:39:03 -07:00
Matthew Hooker 5747f4e890 prevent panic when ssh reconnect fails 2016-10-14 11:23:35 -07:00
Matthew Hooker 4e93e60313 log unknown error, make ExitMissingError clearer 2016-10-06 11:13:39 -07:00
Matthew Hooker 286b7836fa remove dead code.
continues work from a629f1655b
2016-10-05 18:17:02 -07:00
Matthew Hooker 5ab19ea469 bump ssh library, check for ssh.ExitMissingError
should resolve #3920
2016-10-05 18:16:08 -07:00
开恒 5919f8d552 continue add support for file-provisioner implement directory download feature. 2016-09-18 20:48:30 +08:00
Alex Brown 0cea0e5c24 Swap width and height when allocating a pty
RequestPty from crypto/ssh looks like this:

func (s *Session) RequestPty(term string, h, w int, termmodes TerminalModes) error

So arguments 2 and 3 are height and width, respectively. I'm not sure if
the original was just a typo, or if there's an actual reason we want a
40 column terminal. Either way, having a terminal this narrow led me to
a really "fun" bug[0], where `wget` in my shell provisioner scripts
would segfault when trying to display the progress bar.

[0] http://lists.gnu.org/archive/html/bug-wget/2016-02/msg00041.html
2016-04-06 15:40:19 -04:00
Vasiliy Tolstov feee19e4ed file provisioner improvements
* allow specify source/destination as dir
* allow specify many files as source

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2016-02-12 11:48:28 -08:00
Alfonso Acosta a59c82d7a6 Add sftp file transfer support
Adds a new config option: "ssh_file_transfer_method", which can be set to "scp"
or "sftp" (defaults to "scp")
2015-07-26 23:49:18 +00:00
Chris Bednarski 0ca03f09c1 Fix some style issues and add a doc to ErrHandshakeTimeout 2015-07-02 11:58:51 -07:00
Chris Bednarski 5dd8ae45c7 Cleanup some resources we may have created 2015-07-02 03:55:18 -07:00
Chris Bednarski 03850cafc6 Implemented timeout around the SSH handshake, including a unit test 2015-07-02 03:40:47 -07:00
Mitchell Hashimoto 8657b1e9d8 communicator/ssh: more logging 2015-06-29 11:40:08 -07:00
Mark Peek d8b6c94012 Fix typo: diabled -> disabled 2015-06-26 10:52:21 -07:00
Mitchell Hashimoto a019575026 helper/communicator: support disabling SSH agent 2015-06-23 14:52:37 -07:00
Mitchell Hashimoto cbaaf0da52 communicator/ssh: support for bastion SSH 2015-06-17 22:10:42 +02:00
Mitchell Hashimoto 686d4413ec communicator/winrm: error if download 2015-06-15 15:08:56 -07:00
Alexander Golovko 8ecca2aa54 implement ssh.Download() 2015-06-15 15:08:18 -07:00
Mitchell Hashimoto acf31c31a1 communicator/ssh: update logging 2015-06-13 19:00:28 -07:00
Mark Peek b2f8eb68e8 Enable ssh agent forwarding #1066 2015-06-13 17:15:49 -07:00
Mitchell Hashimoto 71d8c6610a Merge pull request #1968 from bhcleek/master
do not request a pty
2015-06-13 16:23:31 -04:00
Mitchell Hashimoto 23a48d6619 go fmt 2015-06-08 21:34:20 -07:00
jszwedko b1497b951c code.google.com/p/go.crypto/ssh -> golang.org/x/crypto/ssh
code.google.com/p/go.crypto/ssh is now at golang.org/x/crypto/ssh as of
https://code.google.com/p/go/source/detail?spec=svn.crypto.69e2a90ed92d03812364aeb947b7068dc42e561e&repo=crypto&r=8fec09c61d5d66f460d227fd1df3473d7e015bc6

Using the code.google.com import redirects properly, but runs into
issues if you try to use a subpackage of `ssh`, e.g. `agent` which
refers to golang.org/x/crypto/ssh causing conflicts if your types expect
code.google.com/p/go.crypto/ssh.

This is a precursor to a PR for #1066.
2015-05-28 08:17:49 -07:00
Emil Hessman c4d4e0a21f communicator/ssh: bind variable value to closure
Fixes the following vet report:

communicator/ssh/communicator_test.go:88: range variable newChannel captured by func literal
2015-02-25 05:43:18 +01:00
Billie H. Cleek 2184892f8a do not request a pty
Change the default behavior from requesting a PTY when executing a
command with the ssh communicator to requesting a PTY only when
configured to do so.

Update the vmware builders to be fully backward compatible with the new
behavior.
2015-02-12 20:18:54 -08:00
Tim Cinel 0f36a051d5 Create temporary copy of symlink before uploading, fixes #1765 2014-12-16 14:11:28 +11:00
Mitchell Hashimoto cc16e19a6b communicator/ssh: upload proper source [GH-1484] 2014-09-10 14:16:24 -07:00