GithubHelp home page GithubHelp logo

jjc1138 / ec2start Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 13 KB

A tool for starting up an EC2 instance (optionally using spot pricing) and setting it up securely for remote connections

Python 100.00%
ec2 python

ec2start's People

Contributors

jjc1138 avatar

Watchers

 avatar  avatar

ec2start's Issues

Be more precise about setting up security group

  • instead of deleting all rules, only delete the rule which is for the SSH/RDP port from a single IP address
  • add an option to skip messing with the security group at all (the group to use will still need to be specified for spot instances)
    • maybe that should be the default?

Set Name tag of new spot instances

  1. would make it easier for users to find instance in their console etc.
  2. would make it possible to reconnect to a running spot instance using the other mode of ec2start if, for example, your client IP has changed so that you need to be reauthorized to connect in the security group

Fetching security groups by name no longer works

botocore.exceptions.ClientError: An error occurred (InvalidParameterValue) when calling the DescribeSecurityGroups operation: Invalid value 'Utility' for groupName. You may not reference Amazon VPC security groups by name. Please use the corresponding id for this operation.

Add support for adding SSH fingerprint to ~/.ssh/known_hosts

Grab the console log and look for the section like:

<14>Sep 18 18:13:01 ec2: #############################################################
<14>Sep 18 18:13:01 ec2: -----BEGIN SSH HOST KEY FINGERPRINTS-----
<14>Sep 18 18:13:01 ec2: 1024 SHA256:cmrwEeQz9q5EK7k9xXaN3Rc6OLLf05iYbd0hgCfIAN4 root@ip-172-31-16-118 (DSA)
<14>Sep 18 18:13:01 ec2: 256 SHA256:0b/g3YU9XAjw6ynBxfZtm+1B4l+JReUjls3/b46BkV8 root@ip-172-31-16-118 (ECDSA)
<14>Sep 18 18:13:01 ec2: 256 SHA256:2UgB9LxtU/HelSjHt3nUzDZQ3tSDauQRNrP28IDKtKw root@ip-172-31-16-118 (ED25519)
<14>Sep 18 18:13:01 ec2: 2048 SHA256:pK0qTBTwpQCd0V/asdmkhZogI6TLgkubYKXo9LVovbU root@ip-172-31-16-118 (RSA)
<14>Sep 18 18:13:01 ec2: -----END SSH HOST KEY FINGERPRINTS-----
<14>Sep 18 18:13:01 ec2: #############################################################

Parse the lines and add them with the hostname to our known_hosts.
Handle the console log being absent, which may happen when it's not the instance's first boot and it may be blank for a while after first starting too.
Do this stuff only if we don't have an entry for the server in our known_hosts, and if we don't then keep trying to get the console log until it works.

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.