Use 127.0.0.1 for ssh tunnel
The previous 'localhost' value was causing connection problems on the remote host, such that it would not create a connection through the tunnel to the specified port.
This commit is contained in:
@@ -26,10 +26,10 @@ class Kamal::Cli::PortForwarding
|
|||||||
@threads = hosts.map do |host|
|
@threads = hosts.map do |host|
|
||||||
Thread.new do
|
Thread.new do
|
||||||
Net::SSH.start(host, KAMAL.config.ssh.user) do |ssh|
|
Net::SSH.start(host, KAMAL.config.ssh.user) do |ssh|
|
||||||
ssh.forward.remote(port, "localhost", port, "localhost")
|
ssh.forward.remote(port, "127.0.0.1", port)
|
||||||
ssh.loop(0.1) do
|
ssh.loop(0.1) do
|
||||||
if @done
|
if @done
|
||||||
ssh.forward.cancel_remote(port, "localhost")
|
ssh.forward.cancel_remote(port)
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
true
|
true
|
||||||
|
|||||||
Reference in New Issue
Block a user