Open snolahc opened 8 years ago
Indeed this is currently unused: https://github.com/tknerr/vagrant-managed-servers/blob/master/lib/vagrant-managed-servers/action/read_state.rb#L56
However this one is relevant : https://github.com/tknerr/vagrant-managed-servers/blob/master/lib/vagrant-managed-servers/provider.rb#L24
We might be able to reuse the builtin config.vm.ssh_port
option here (see https://docs.vagrantup.com/v2/vagrantfile/ssh_settings.html) instead of hardcoding to 22.
So much I can tell now, but I can't do much further because other things are currently using up my time...
PR are welcome
I needed to run over a ssh tunnel opened on port 9022.
I was going to debug this, but the plugin actually works properly when overriding the ssh port as seen below:
config.vm.define "thirdbox" do |thirdbox|
thirdbox.vm.box = "tknerr/managed-server-dummy"
thirdbox.vm.provider :managed do |managed, override|
managed.server = "127.0.0.1"
override.ssh.username = "niko"
override.ssh.port = 9022
override.ssh.private_key_path = "~/.ssh/id_rsa"
end
end
@snolahc does the approach shown by @hellonico work for you?
If not, can you provide a Vagrantfile example where it does not work?
Hi,
First thanks for your really useful provider !
i need specific SSH ports to access my servers and the option is not available in the Vagrantfile, the 22 port is hard-coded in the plugin.
Line 24 of provider.rb : :port => @machine.provider_config.ssh-port
maybe ? the 22 port is hard-coded in action/read_state.rb but seems unused.
thanks :)