ec2instance-connect

command
v0.0.0-...-96383a8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2022 License: MIT Imports: 9 Imported by: 0

README

EC2 Instance Connect support

Start a SSH session. This program is meant to be configured as a ProxyCommand in the ssh_config file.

Build

go build
This will output a file named ec2instance-connect in the current directory.

Usage

ec2instance-connect [profile] user@target_spec

The profile_name argument is the name of profile in the local AWS configuration to use for credentials.
If unset, it will consult the AWS_PROFILE environment variable, and if that is unset, will use credentials
set via environment variables, or from the default profile.

The user parameter should be set as the user used to connect to the remote host.  This is required by the
AWS API in order to provision the SSH public key for the connection..

The target_spec parameter is required, and is in the form of ec2_instance_id:port_number (ex: i-deadbeef:80)

Example ssh_config:

Host i-*
  IdentityFile ~/.ssh/path_to_your_private_key
  ProxyCommand ec2instance-connect %r@%h:%p
  User ec2-user

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL