add port option to ssh config

This commit is contained in:
tH34UT0m4t0R 2011-05-12 11:23:32 -07:00 committed by Mitchell Hashimoto
parent 6630dfe2d7
commit e72753874d
2 changed files with 5 additions and 0 deletions

View File

@ -12,9 +12,11 @@ module Vagrant
attr_accessor :forward_agent
attr_accessor :forward_x11
attr_accessor :sudo_shell
attr_accessor :port
def initialize
@sudo_shell = "bash"
@port = nil
end
def private_key_path

View File

@ -154,6 +154,9 @@ module Vagrant
pnum = opts[:port]
return pnum if pnum
# Check if a port was specified in the config
return env.config.ssh.port if env.config.ssh.port
# Check if we have an SSH forwarded port
pnum = nil
env.vm.vm.network_adapters.each do |na|