Skip to content

Commit

Permalink
Add support for specifying custom SSH port of a managed server
Browse files Browse the repository at this point in the history
  • Loading branch information
nstojiljkovic committed Sep 19, 2019
1 parent a546156 commit 085fc45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## 0.9.0 (unreleased)

* ...
* add support for specifying custom SSH port of a managed server

## 0.8.0 (released 2016-11-04)

Expand Down
6 changes: 4 additions & 2 deletions lib/vagrant-managed-servers/provider.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "log4r"
require "vagrant"
require "uri"

module VagrantPlugins
module ManagedServers
Expand All @@ -19,9 +20,10 @@ def action(name)

# Returns the SSH info for accessing the managed server.
def ssh_info
uri = URI("ssh://#{@machine.provider_config.server}")
return {
:host => @machine.provider_config.server,
:port => 22
:host => uri.hostname,
:port => uri.port || 22
}
end

Expand Down

0 comments on commit 085fc45

Please sign in to comment.