0.4.0 • Published 11 years ago
sugar-ssh v0.4.0
Sugar SSH
Requirements
- Node.JS of any recent vintage
- SSH keys stored in ~/.ssh/and named after the AWS keypairs
- ~/.aws/configfile 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
- --helpdisplays help and exits
- --dnsprints only the DNS hostname of the target instance, then exits. Suitable for shell substitution
- --listprints a table of all matching instances
- --user <username>forces the username used for the server- Default: ubuntu
 
- Default: 
- --key <keyname>overrides the key name for the instance- Specified keys will still be resolved using ~/.ssh/
 
- Specified keys will still be resolved using 
- -f <port>brings the remote instance's specified port to your local machine using an SSH tunnel
- --ssh-optsprints 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 sshorscpcalls
 
- Example: