Skip to content

Utility to quickly SSH into a public EC2 instance without keypairs

License

Notifications You must be signed in to change notification settings

ThreeToes/conch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conch

Conch is a quick and dirty application to get a shell into an EC2 instance with a public IP without having access to a keypair.

Building

Run the following to generate a binary in the build folder

$ go build -o build/conch ./...

Running

You will require the following command line utils on the path:

  • ssh
  • ssh-keygen

Conch generates a temporary keypair to use in connecting, and just runs the SSH command. Easier and less error prone than trying to reimplement everything. The simplest usage is just

$ conch

AWS requirements

You will need to assume a role that is allowed to use the ec2-instance-connect:SendSSHPublicKey on the Ubuntu or Amazon Linux 2 server you want to connect to.

The server will also need to have the utility installed.

Arguments

  • -p {AWS Profile name} - Specify the AWS profile to use
  • -r {AWS Region} - Specify the AWS region to use
  • -u {EC2 Server instance user} - Specify the OS user on the EC2 instance
  • -o {SSH port} - Specify the SSH port
  • -v - Verbose logging
  • -b - Use a bastion server
  • -bu - Bastion username, default ec2-user

About

Utility to quickly SSH into a public EC2 instance without keypairs

Resources

License

Stars

Watchers

Forks

Packages

No packages published