summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2017-02-17 02:04:16 +0000
committerDamien Miller <djm@cvs.openbsd.org>2017-02-17 02:04:16 +0000
commit0523927e3a5503479de5ca45f512f167fa09a046 (patch)
treeabf08a64d7633ff5baff43b03af22f8609c14a6b /usr.bin/ssh/ssh.c
parent21f9a968855f6c650c68ad6d3bf3ea6ecca3bb56 (diff)
For ProxyJump/-J, surround host name with brackets to allow
literal IPv6 addresses. From Dick Visser; ok dtucker@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 025db6b39fc..029edc4272d 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.448 2016/12/06 07:48:01 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.449 2017/02/17 02:04:15 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,