Posted almost 7 years ago. Visible to the public.

Script to open an SSH shell to a Capistrano deployment target

We regularly need to connect to the server in order to e.g. access the production console. Guessing the Capistrano deploy user and then again guessing the right directory on the server is awkward, so we wrote a script that parses config/deploy and gives you the handy command shell-for.

Run it from any project directory like this, passing a Capistrano multistage deployment target:

shell-for staging

Now it also supports commands to be remotely executed before loading the bash. Use --no-bash to only execute the command and load no bash.

shell-for staging --no-bash top

This script is part of our geordi gem on github.

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Author of this card:

Dominik Schöler
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Dominik Schöler to makandra dev