Git Product home page Git Product logo

gosh's Introduction

gosh

GoSH (Go-SHell, GO-sSH) is a terminal based utility to list instances in cloud providers and help connect to them through ssh.

Supported cloud providers

  • AWS (ec2)
  • ...

More providers to be added in the future.

Usage

gosh does its best to use configured tools in your environments.

To access the AWS API, it relies on the AWS CLI config/credentials.

To connect to an instance, it simply calls ssh <ip> and relies on your system's ssh client configuration. By default it will use the instance's private IP, but this behavior can be overridden to use the public IP instead through the configuration file.

Here's a simple example on how to configure the ssh client's config file to be able to connect to IPs in the 10.0.0.0/16 block. See the link above for more options.

Host 10.0.*
  User tester
  IdentityFile ~/.ssh/tester.id_rsa

When gosh starts without any configuration, it will try to use the default profile for the AWS CLI to fetch instances.

If you need more than just the default, you can hit w once gosh is running to write a configuration file to ~/.gosh.yaml (user's home directory).

Configuration

Here's an example of a configuration file that has 2 profiles usw1 and use1. Both profiles use the default profile from AWS CLI but with different regions. The refresh tells gosh to pull the list of instances at regular intervals (in seconds)

version: 1
profiles:
    - id: usw1
      provider: aws
      name: default
      region: us-west-1
      prefer_public_ip: false
      refresh:
        enabled: true
        interval: 60
    - id: use1
      provider: aws
      name: default
      region: us-east-1
      prefer_public_ip: false
      refresh:
        enabled: true
        interval: 60
show_utc_time: true
show_local_time: true
time_format: "2006-01-02 15:04:05"

When gosh starts it will look for a configuration files in this order:

  1. ./.gosh.yaml
  2. ~/.gosh.yaml
  3. /etc/gosh.yaml

When saving the configuraiton it will overwrite the file that it loaded, or if none were found it will write it to ~/.gosh.yaml.

Keybinds

gosh has various keybinds to navigate the UI:

  • <tab> to cycle through profile pages
  • 1 through 9 for quick access to profile pages
  • q to exit (ctrl-c works also)
  • w to save the configuration file
  • r to refresh instances in the current profile
  • R to toggle automatic refreshes for the current profile
  • up/down/left/right (hjkl) to navigate through individual instances and colums
  • pageUp/pageDown/home/end to quick navigation through the list of instances
  • ENTER to ssh into the current selected instance
  • ~ to toggle display of an internal log (only needed for development)

Upcoming

Here's a non-exhaustive list of things planned:

  • Add configuration options for which instances fields and tags to display
  • Disable the internal log and log window by default and use a configuration option
  • Allow configuring the refresh interval through the UI
  • Add search and filtering capabilities to quickly find instances
  • ...

gosh's People

Contributors

yogin avatar

Stargazers

Eric Ciminelli avatar

Watchers

 avatar James Cloos avatar Eric Ciminelli avatar

gosh's Issues

Typing issue when ssh'ing into a server

When ssh'ing into a server, the application will "swallow" some keys, so that the first time you type something, it will most likely fail.

This is due to a dependency library that handles the keyboard typing when suspending the UI.

This is often noticed when ssh'ing into a new server, the ssh client will ask to add the server's fingerprint, and the user needs to type either yes or no, and its likely that whatever you type will not be recognized at first because of the keyboard handler. Typing the answer again will then actually submit the response, and from there it should work as normal.

If you're able to ssh into a server directly without the fingerprint question, then I'd recommend hitting enter once to "clear" whatever is left in the input buffer.

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.