If you are familiar with Rails you must have ever used Capistrano as automatic deployment. It will give us a lot of benefit and its easy enough to understand. I’ve been using Capistrano for about 1 year. There are configuration that you can setup manually based on your preference. Said, you already have your SSH in port 22000 instead 22. Usually you did

1
ssh -p 22000 user@domain
. So how do we setup that port in Capistrano?

There are 2 ways to do it. All you need is to tell capistrano that you are using specific port by adding option

1
set :port, 22000

or

1
ssh_options[:port] = 22000

into your recipe, for example in

1
config/deploy.rb
or
1
config/deploy/yourenviroment.rb
.

There are so many options in Capistrano. Probably i’ll write it later in another post.