This ports over the ssh module from terratest so that we can use it in our CLI tooling to SSH to instances. An example use case is SSH-ing to a deployed jenkins instance in the Reference Architecture to retrieve the admin token for configuring Jenkins over the API.
Note that this implementation has several changes over the terratest version:
The terratest functions only supported a single hop for jump hosts. This implementation supports arbitrary hops by treating the JumpHost parameter as a linked list.
Connection state tracking is simplified to a single Stack data structure that tracks all the items that need to be closed.
HostKeyCallback is now configurable at the top level Host data structure.
This ports over the
ssh
module fromterratest
so that we can use it in our CLI tooling to SSH to instances. An example use case is SSH-ing to a deployed jenkins instance in the Reference Architecture to retrieve the admin token for configuring Jenkins over the API.Note that this implementation has several changes over the
terratest
version:terratest
functions only supported a single hop for jump hosts. This implementation supports arbitrary hops by treating theJumpHost
parameter as a linked list.Stack
data structure that tracks all the items that need to be closed.HostKeyCallback
is now configurable at the top levelHost
data structure.