GoSH (Go-SHell, GO-sSH) is a terminal based utility to list instances in cloud providers and help connect to them through ssh.
- AWS (ec2)
- ...
More providers to be added in the future.
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).
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:
./.gosh.yaml
~/.gosh.yaml
/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
.
gosh
has various keybinds to navigate the UI:
<tab>
to cycle through profile pages1
through9
for quick access to profile pagesq
to exit (ctrl-c works also)w
to save the configuration filer
to refresh instances in the current profileR
to toggle automatic refreshes for the current profileup/down/left/right
(hjkl
) to navigate through individual instances and columspageUp/pageDown/home/end
to quick navigation through the list of instancesENTER
to ssh into the current selected instance~
to toggle display of an internal log (only needed for development)
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
- ...