Re: ssh config Host case insensitive

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Mon, 3 Feb 2014, Ike Devolder wrote:

> Hi,
> 
> There seems to be an issue where a case sensitive Host entry is no
> longer working after update to openssh 6.5
> 
> example entry: (was working before update)
> Host MyHost
> 	Hostname 192.168.0.1
> 	Port 1234
> 	User root
> 	IdentityFile ~/.ssh/id_rsa
> 
> When issuing "ssh MyHost" the outcome is now:
> ssh: Could not resolve hostname myhost: Name or service not known
> 
> When the above entry is changed to:
> Host myhost, the connection works fine again.

This should fix it:

Index: ssh.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/ssh.c,v
retrieving revision 1.398
diff -u -p -r1.398 ssh.c
--- ssh.c	31 Jan 2014 16:39:19 -0000	1.398
+++ ssh.c	3 Feb 2014 21:05:40 -0000
@@ -752,7 +752,6 @@ main(int ac, char **av)
 	if (!host)
 		usage();
 
-	lowercase(host);
 	host_arg = xstrdup(host);
 
 	OpenSSL_add_all_algorithms();
@@ -882,6 +881,7 @@ main(int ac, char **av)
 	}
 
 	/* If canonicalization requested then try to apply it */
+	lowercase(host);
 	if (options.canonicalize_hostname != SSH_CANONICALISE_NO)
 		addrs = resolve_canonicalize(&host, options.port);
 	/*
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev




[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux