add port option to ssh config
This commit is contained in:
parent
6630dfe2d7
commit
e72753874d
|
@ -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
|
||||
|
|
|
@ -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|
|
||||
|
|
Loading…
Reference in New Issue