Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Dec 15, 2023. It is now read-only.
/aws-sshPublic archive

Connect to AWS EC2 Instances at Lightning Speed

License

NotificationsYou must be signed in to change notification settings

sreedevk/aws-ssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

OBSOLETE - USE BLAZE-SSH INSTEAD

Due to limitations in adding features & extending aws-ssh, I've createdblaze-ssh.It adds features like cached instance list & configurable address type (private/public).Please useblaze-ssh instead of aws-ssh.

Dynamically SSH Into AWS EC2 Instances at Lightning Speed

aws-ssh is a bash script for conveniently ssh-ing into AWS EC2 instances.it usesfzf,jq &aws-cli under the hood.

Pre-Requisites

  1. aws-ssh requires bash to be installed (even when running the script in other shells)
  2. make sure you have the following programs installed
    1. fzf
    2. jq
    3. aws-cli installed & configured
  3. aws configure should've been run & authenticated prior to using aws-ssh

Installation

  1. fetch theaws-ssh script usingwget
  wget https://raw.githubusercontent.com/sreedevk/aws-ssh/main/aws-ssh -P~/.local/bin

NOTE: runecho $PATH & ensure that~/.local/bin is included in $PATH.

  1. Runchmod to mark~/.local/bin/aws-ssh as executable
  chmod +x~/.local/bin/aws-ssh

Usage

=======================================================================AWS-SSH: Connect to AWS EC2 Instances at Lightning Speed=======================================================================Usage:list instances:    aws-ssh list <partial-search-term>connect:        aws-ssh connect <partial-search-term> <username>private ip connect: aws-ssh priconn <partial-search-term> <username>public  ip connect: aws-ssh pubconn <partial-search-term> <username>Notes:<partial-search-tearm> matchs "instance name" and "instance id"<username> will be taken from ~/.aws-ssh-config if not providedBastion Servers can be configured in ~/.aws-ssh-configPrivate Keys (*.pem) can be configured in ~/.aws-ssh-configExample ~/.aws-ssh-config:PRIVATE_KEY=~/.ssh/somekey.pemBASTION=username@192.168.50.100DEFAULT_USER=ec2-user

Configuration (Optional)

aws-ssh can be configured to set some default options.The configuration file foraws-ssh should be present at~/.aws-ssh-config.

The~/.aws-ssh-config is just a bash script that is sourced byaws-ssh before execution.The following can be added to~/.aws-ssh-config

  1. PRIVATE_KEY

The path to the key to be passed into the-i option while ssh-ing. if not configured, the-i is omitted.

PRIVATE_KEY=~/.ssh/somekey.pem
  1. BASTIONThe jump/bastion server to use while ssh-ing into ec2-instances.
BASTION=username@192.168.50.100
  1. DEFAULT_USERif the username part is omitted while usingaws-ssh connect <instance-name> <username>, theDEFAULT_USER will be used.This can be beneficial if you have the same username for most ec2-instances, as you won't have to type the username each time.
DEFAULT_USER=ec2-user

EXAMPLE~/.aws-ssh-config

PRIVATE_KEY=~/.ssh/somekey.pemBASTION=username@192.168.50.100DEFAULT_USER=ec2-user

About

Connect to AWS EC2 Instances at Lightning Speed

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp