Skip to content
/ jump.sh Public

a simple script for ssh to AWS EC2 nodes based on Name Tag and Instance ID, with tab auto-completion

Notifications You must be signed in to change notification settings

dictcp/jump.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jump.sh

a simple script for ssh to AWS EC2 nodes based on Name Tag and Instance ID, with tab auto-completion

$ jump.sh stg-limestone- # pressing TAB
stg-limestone-api-0ce455a75    stg-limestone-api-060162c  stg-limestone-worker-0791deb1d  

Setup

# please make sure you have awscli and jq installed
# macOS user can install them via brew install awscli jq

# clone it
git clone https://github.com/dictcp/jump.sh ~/.jumphost
echo '. ~/.jumphost/auto-completion.sh' >> ~/.bashrc # or .zshrc, depending which shell you use

# and please modify dev.apse1.sh to fit your environment
cd ~/.jumphost/generator.d
cp dev.apse1.example dev.apse1.sh

# please also add ssh username as EC2 Tag `SshUser` to your EC2 Instances
# and then the proper user will be used when jump.sh is executed

# you may also consider to modify jump.sh to leverage jumphost via option `ProxyJump`
# ref: https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Proxies_and_Jump_Hosts

Access instances with SSH key

There is no explicit way to config ssh key on specific connection. We can use ssh-add to set up connection with SSH automatically.

Other similar projects

About

a simple script for ssh to AWS EC2 nodes based on Name Tag and Instance ID, with tab auto-completion

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages