Revert "Put host last in SSH command line"
This reverts commit e1969d1e33
.
This commit is contained in:
parent
a307797c11
commit
8cf3bb8737
2 changed files with 11 additions and 10 deletions
|
@ -13,34 +13,34 @@ var sshcmdTests = []struct {
|
|||
{
|
||||
Config{User: "user", Host: "host", Path: "dir/subdir"},
|
||||
"ssh",
|
||||
[]string{"-l", "user", "-s", "sftp", "--", "host"},
|
||||
[]string{"host", "-l", "user", "-s", "sftp"},
|
||||
},
|
||||
{
|
||||
Config{Host: "host", Path: "dir/subdir"},
|
||||
"ssh",
|
||||
[]string{"-s", "sftp", "--", "host"},
|
||||
[]string{"host", "-s", "sftp"},
|
||||
},
|
||||
{
|
||||
Config{Host: "host", Port: "10022", Path: "/dir/subdir"},
|
||||
"ssh",
|
||||
[]string{"-p", "10022", "-s", "sftp", "--", "host"},
|
||||
[]string{"host", "-p", "10022", "-s", "sftp"},
|
||||
},
|
||||
{
|
||||
Config{User: "user", Host: "host", Port: "10022", Path: "/dir/subdir"},
|
||||
"ssh",
|
||||
[]string{"-p", "10022", "-l", "user", "-s", "sftp", "--", "host"},
|
||||
[]string{"host", "-p", "10022", "-l", "user", "-s", "sftp"},
|
||||
},
|
||||
{
|
||||
// IPv6 address.
|
||||
Config{User: "user", Host: "::1", Path: "dir"},
|
||||
"ssh",
|
||||
[]string{"-l", "user", "-s", "sftp", "--", "::1"},
|
||||
[]string{"::1", "-l", "user", "-s", "sftp"},
|
||||
},
|
||||
{
|
||||
// IPv6 address with zone and port.
|
||||
Config{User: "user", Host: "::1%lo0", Port: "22", Path: "dir"},
|
||||
"ssh",
|
||||
[]string{"-p", "22", "-l", "user", "-s", "sftp", "--", "::1%lo0"},
|
||||
[]string{"::1%lo0", "-p", "22", "-l", "user", "-s", "sftp"},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue