-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SSH proxy: allow using a bare hostname without root@
Otherwise we can't connect to the proxy as the local user and we can't use ~/.ssh/config to set User directives. Defaulting to root@ is hard to deprecate without introducing new config. A clean break is probably clearest.
- Loading branch information
Showing
4 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -294,7 +294,7 @@ class CommandsAppTest < ActiveSupport::TestCase | |
|
||
test "run over ssh with proxy" do | ||
@config[:ssh] = { "proxy" => "2.2.2.2" } | ||
assert_equal "ssh -J root@2.2.2.2 -t [email protected] -p 22 'ls'", new_command.run_over_ssh("ls", host: "1.1.1.1") | ||
assert_equal "ssh -J 2.2.2.2 -t [email protected] -p 22 'ls'", new_command.run_over_ssh("ls", host: "1.1.1.1") | ||
end | ||
|
||
test "run over ssh with proxy user" do | ||
|
@@ -304,7 +304,7 @@ class CommandsAppTest < ActiveSupport::TestCase | |
|
||
test "run over ssh with custom user with proxy" do | ||
@config[:ssh] = { "user" => "app", "proxy" => "2.2.2.2" } | ||
assert_equal "ssh -J root@2.2.2.2 -t [email protected] -p 22 'ls'", new_command.run_over_ssh("ls", host: "1.1.1.1") | ||
assert_equal "ssh -J 2.2.2.2 -t [email protected] -p 22 'ls'", new_command.run_over_ssh("ls", host: "1.1.1.1") | ||
end | ||
|
||
test "run over ssh with proxy_command" do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters