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
|
@ -189,8 +189,11 @@ func buildSSHCommand(cfg Config) (cmd string, args []string, err error) {
|
|||
|
||||
cmd = "ssh"
|
||||
|
||||
if cfg.Port != "" {
|
||||
args = append(args, "-p", cfg.Port)
|
||||
host, port := cfg.Host, cfg.Port
|
||||
|
||||
args = []string{host}
|
||||
if port != "" {
|
||||
args = append(args, "-p", port)
|
||||
}
|
||||
if cfg.User != "" {
|
||||
args = append(args, "-l")
|
||||
|
@ -198,8 +201,6 @@ func buildSSHCommand(cfg Config) (cmd string, args []string, err error) {
|
|||
}
|
||||
args = append(args, "-s")
|
||||
args = append(args, "sftp")
|
||||
|
||||
args = append(args, "--", cfg.Host)
|
||||
return cmd, args, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue