I want to enter the rails console on production server from my local machine via capistrano. I found some gists, e.g. https://gist.github.com/813291 and when I enter console via
I have fiddled with that approach as well, but then resorted to avoiding building my own interactive SSH shell client and just went with this snippet I found that simply uses good old SSH. This might not be suitable if you have some weird SSH gateway proxying going on, but for logging into a box and performing some operations, it works like a charm.