Skip to content

A tool to reset SSH keys on Linux EC2 instances and enable Guest access without a password on Windows instances

License

Notifications You must be signed in to change notification settings

ratnakarreddyg/ec2-reset-key

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ec2-reset-key : Reset EC2 SSH keys/passwords

This tool can be used to reset lost SSH keys on EC2 Linux instances and to enable Guest access on EC2 Windows instances when the Administrator password is lost.

Requirements

You will need to have the following in order to use ec2-reset-key:

  • Java 1.6+
  • AWS Access Key and Secret Access Key or IAM Role

Usage

usage: ec2-reset-key -i <instance id> -k <keypair name>
 -f,--publicKey <arg>     Linux Only: Path to public key file (i.e.
                          ~/mypublic_key.pub)
 -h,--help                help
 -i,--instance-id <arg>   Instance ID of the EC2 instance (e.g. i-XXXXXX)
 -r,--region <arg>        region (us-east-1, us-west-1, etc...)
 -t,--type <arg>          Type of instance (i.e. linux, windows)

EC2 Linux Example

 bin/ec2-reset-key -r us-east-1 -t linux -f ~/.secrets/ssh_public_key -i i-a71b3b49

Windows EC2 Example

 bin/ec2-reset-key -r us-east-1 -t windows -i i-9bdfd070

About

A tool to reset SSH keys on Linux EC2 instances and enable Guest access without a password on Windows instances

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Groovy 83.8%
  • Shell 16.2%