[PATCH] allow [brackets] around IPv6 literals like scp requires

Mantas Mikulėnas grawity at gmail.com
Fri May 12 04:10:35 AEST 2017


It is difficult to script things when scp requires the brackets but ssh
forbids them.
---
 ssh.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ssh.c b/ssh.c
index 70631c24..7abfe51a 100644
--- a/ssh.c
+++ b/ssh.c
@@ -942,6 +942,9 @@ main(int ac, char **av)
 	if (!host)
 		usage();
 
+	/* Allow [brackets] around IPv6 addresses for consistency with scp. */
+	host = cleanhostname(host);
+
 	host_arg = xstrdup(host);
 
 #ifdef WITH_OPENSSL
-- 
2.13.0



More information about the openssh-unix-dev mailing list