# Capistrano - SSH Port

**URL:** <https://www.ruby-forum.com/t/capistrano-ssh-port/58495>\
**Category:** Rails\
**Created:** [April 22, 2006, 5:46am UTC](https://www.ruby-forum.com/t/capistrano-ssh-port/58495 "2006-04-22T05:46:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dylan\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/34f0e0/32.png) [@Dylan\_S](https://www.ruby-forum.com/u/Dylan_S)\
**Post date:** [April 22, 2006, 5:46am UTC](https://www.ruby-forum.com/t/capistrano-ssh-port/58495/1 "2006-04-22T05:46:17Z")

</div>

I’ve been deploying with Capistrano for a while now, and have had no  
problems… until now.

When I try and do a “cap deploy”, cap tries to connect to my remote  
server  
via SSH on port 22… even though in my deploy.rb, I’ve had the  
following  
set:  
ssh options[:port] = 8081

I did a “sudo gem update --remote capistrano”, and I’m up to speed on  
the  
latest release, so am utterly confused as to why it’s not picking up  
this  
option from the config.

Any ideas ?

---

<div class="post-metadata">

**Author:** ![Dylan\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/34f0e0/32.png) [@Dylan\_S](https://www.ruby-forum.com/u/Dylan_S)\
**Post date:** [July 6, 2006, 5:15am UTC](https://www.ruby-forum.com/t/capistrano-ssh-port/58495/2 "2006-07-06T05:15:29Z")

</div>

On Apr 21, 2006, at 9:44 PM, Dylan S. wrote:

> I’ve been deploying with Capistrano for a while now, and have had  
> no problems… until now.
> 
> When I try and do a “cap deploy”, cap tries to connect to my remote  
> server via SSH on port 22… even though in my deploy.rb, I’ve had  
> the following set:  
> ssh options[:port] = 8081

Is that a space or underscore between “ssh” and “options”? It should be:

ssh\_options[:port] = 8081

I just tried it locally and it seems to be honoring the port here.

- Jamis
