diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2017-03-08 12:07:48 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2017-03-08 12:07:48 +0000 |
commit | 4be779a3741698cb9a8f3d41fd0c99d4c3bf73a7 (patch) | |
tree | 1006ea323d089c85f4d84ddaa547f73ed60abe6e | |
parent | 75900197ea3563ad8982cb26c3337a5cee3da727 (diff) |
quote [host]:port in generated ProxyJump commandline; the [ / ]
characters can confuse some shells (e.g. zsh).
Reported by Lauri Tirkkonen via bugs@
-rw-r--r-- | usr.bin/ssh/ssh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 029edc4272d..84e664a0f03 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.449 2017/02/17 02:04:15 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.450 2017/03/08 12:07:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1072,7 +1072,7 @@ main(int ac, char **av) options.proxy_use_fdpass = 0; snprintf(port_s, sizeof(port_s), "%d", options.jump_port); xasprintf(&options.proxy_command, - "ssh%s%s%s%s%s%s%s%s%s%.*s -W [%%h]:%%p %s", + "ssh%s%s%s%s%s%s%s%s%s%.*s -W '[%%h]:%%p' %s", /* Optional "-l user" argument if jump_user set */ options.jump_user == NULL ? "" : " -l ", options.jump_user == NULL ? "" : options.jump_user, |