capistrano-rails-console
capistrano-rails-console copied to clipboard
How can I set ssh port?
Thank you for wonderful gem ! When I do "cap production rails:console" I get: "ssh: connect to host XXXXX port 22: Connection timed out"
I am not using default port 22 of course, I set port number in my deploy/production.rb and deploy works well. How and where should I put port number for this gem?
How do you set the port in deploy/production.rb?
Fails for me too, i've set the port like this in deploy/production.rb
set :ssh_options, { forward_agent: true, port: 39456, user: 'username' }
regular cap deploys work fine, this task does not
+1
I set the port in deploy/production.rb as:
set :ssh_options, {
keys: %w(/Users/Augusto/Documents/Credentials/mykey.pem),
port: 1222
}
regular cap also works fine
Aha! Fixed it like this:
In the single server settings in the deploy/production.rb file:
server 'xx.xx.xx.xx', user: 'deploy', roles: %w{web app db},
ssh_options: { keys: %w(/Users/Augusto/Documents/Credentials/mykey.pem),
port: 1222
}
Now the gem connects on the correct SSH port
Hi @matthutchinson, @augustosamame thanks for your feedback.
This issue should be fixed with sshkit-interactive v0.2.1 (https://github.com/afeld/sshkit-interactive/commit/8491bcfb3df84127d06889da56b236735799252c). Please check if it works as expected after a bundle update.