Giter VIP home page Giter VIP logo

ec2-ssh's Introduction

INSTALL

1. sudo python setup.py install
It will provide ec2-ssh script that will make ssh'ing to EC2 instance more sane.
Be sure to export AWS vars into your shell rc file(eg. .bashrc) 

export AWS_SECRET_KEY=yourkey
export AWS_SECRET_ACCESS_KEY=your_access_key

% ec2-ssh app1
# where app1 is the instance name of ec2 instance visible in AWS dashboard
# equivalent to
# ssh [email protected] where ec2-123-45-67-89.compute-1.amazonaws.com is the public URL to app1 name in corresponding AWS account.

% ec2-ssh root@appserver
% ec2-ssh deploy@nginx2 sudo restart nginx

% ec2-ssh -l 
will list out all the active ec2 instances

% ec2-ssh -a site1 "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqVeNqpSJEhGrFvJeZdLyOXVAFORF0jj3/voX5wZ6rCXHXOXWVDcbVDryH5h6iGAfAeGfs11oTkh9i7L4KQC+mx8nInQy92LwTDMV8bdU1LGl6nCYOez8r0V+YlsSPem23byQga6IKCGUk/DwVpjFUESY86JCA7hMHsiSmCYsai8ovr8euFbZ8ZbHACfC3RtzDN8nx1p3Tuk2Ka0aEMKyAzQVRs9fW48sJ5zGJexY1nmZt5dXF1vb4u8qCHh7Z7+iLPo5sX4Td813XgAZ1FOMajyShgf5HBf8T4IUNbrN5Uf3pLTeVDLIDwqFpDQ2lSaurZ4umVLd11OALQ1TssbwwQ== [email protected]"

will add the specified ssh keys(don't forget the quotes) directly to ec2 instance identified by site1 handle provided the user initiating the command is already in the authorized-keys of the site1 machine



ec2-ssh's People

Contributors

shayne avatar

Watchers

Saroj Maharjan avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.