summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-02-17 02:04:15 +0000
committerDamien Miller <djm@mindrot.org>2017-02-17 14:52:24 +1100
commit10577c6d96a55b877a960b2d0b75edef1b9945af (patch)
treefea8548bea1f766be05aec0203921d9f4c9e6140 /ssh.c
parentb2afdaf1b52231aa23d2153f4a8c5a60a694dda4 (diff)
upstream commit
For ProxyJump/-J, surround host name with brackets to allow literal IPv6 addresses. From Dick Visser; ok dtucker@ Upstream-ID: 3a5d3b0171250daf6a5235e91bce09c1d5746bf1
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh.c b/ssh.c
index ee0b16dc2..0b34edffa 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.448 2016/12/06 07:48:01 djm Exp $ */ 1/* $OpenBSD: ssh.c,v 1.449 2017/02/17 02:04:15 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1103,7 +1103,7 @@ main(int ac, char **av)
1103 options.proxy_use_fdpass = 0; 1103 options.proxy_use_fdpass = 0;
1104 snprintf(port_s, sizeof(port_s), "%d", options.jump_port); 1104 snprintf(port_s, sizeof(port_s), "%d", options.jump_port);
1105 xasprintf(&options.proxy_command, 1105 xasprintf(&options.proxy_command,
1106 "ssh%s%s%s%s%s%s%s%s%s%.*s -W %%h:%%p %s", 1106 "ssh%s%s%s%s%s%s%s%s%s%.*s -W [%%h]:%%p %s",
1107 /* Optional "-l user" argument if jump_user set */ 1107 /* Optional "-l user" argument if jump_user set */
1108 options.jump_user == NULL ? "" : " -l ", 1108 options.jump_user == NULL ? "" : " -l ",
1109 options.jump_user == NULL ? "" : options.jump_user, 1109 options.jump_user == NULL ? "" : options.jump_user,