sugar-ssh
sugar-ssh
npm i sugar-ssh
sugar-ssh

sugar-ssh

AWS EC2 SSH tool for easy access to all of your instances with a simple shell command

by scopely

0.4.0 (see all)License:Apache-2.0TypeScript:Not Found
npm i sugar-ssh
Readme

Sugar SSH

Requirements

  • Node.JS of any recent vintage
  • SSH keys stored in ~/.ssh/ and named after the AWS keypairs
  • ~/.aws/config file with credentials (details)
    • For a good experience, include the region

Installation and Updating

npm install -g sugar-ssh

Usage

  • sugar <instance filter>
  • sugar <instance filter>@<profile>
  • sugar -f <port to forward> <instance filter>

If multiple instances match the filter, and they appear similar (based on Name), then one will be randomly chosen.

Examples

  • sugar http
  • sugar postgres@prod
  • sugar -f 8000 webserv@prod

Flags

  • --help displays help and exits
  • --dns prints only the DNS hostname of the target instance, then exits. Suitable for shell substitution
  • --list prints a table of all matching instances
  • --user <username> forces the username used for the server
    • Default: ubuntu
  • --key <keyname> overrides the key name for the instance
    • Specified keys will still be resolved using ~/.ssh/
  • -f <port> brings the remote instance's specified port to your local machine using an SSH tunnel
  • --ssh-opts prints only the full arguments list for ssh
    • Example: -i /home/user/.ssh/aws ubuntu@ec2-w-x-y-z.compute-1.amazonaws.com
    • Useful for embedding in custom ssh or scp calls

Downloads/wk

7

GitHub Stars

10

LAST COMMIT

7yrs ago

MAINTAINERS

1

CONTRIBUTORS

6

OPEN ISSUES

4

OPEN PRs

0
VersionTagPublished
0.4.0
latest
8yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate