Skip to content

Commit

Permalink
Fix issue with ProxyJump on Windows
Browse files Browse the repository at this point in the history
ProxyJump commandline constructed by ssh following Unix commandline argument convention using single quotes. Added a #ifdef block to use double quotes for Windows. 
PowerShell/Win32-OpenSSH#1172
  • Loading branch information
manojampalam authored May 21, 2019
1 parent 44ba548 commit 8d7ab2b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,11 @@ main(int ac, char **av)
options.proxy_use_fdpass = 0;
snprintf(port_s, sizeof(port_s), "%d", options.jump_port);
xasprintf(&options.proxy_command,
#ifdef WINDOWS
"%s%s%s%s%s%s%s%s%s%s%.*s -W \"[%%h]:%%p\" %s",
#else
"%s%s%s%s%s%s%s%s%s%s%.*s -W '[%%h]:%%p' %s",
#endif
sshbin,
/* Optional "-l user" argument if jump_user set */
options.jump_user == NULL ? "" : " -l ",
Expand Down

0 comments on commit 8d7ab2b

Please sign in to comment.