This entry is meant to be a feature request for handling host names with accents in them. I see at least two ways of possible technical approaches: either use the libidn library, or use the AI_IDN and AI_CANONIDN flags or getaddrinfo() which are available at least in glibc cvs and some brand new distros e.g. Fedora 2. I send a quick & dirty & should-not-be-applied-as-it-is patch which is kind of a case study that "okay it's really not that hard to make it work". It basically works, however, there are some bugs/notes which might require some attention. - it sure needs some autoconf'isation to autodetect whether AI_IDN and AI_CANONIDN are available. - setlocale() is required, since getaddrinfo() assumes the accented host names are encoded in the current locale's charset. - Currently the host name is put in .ssh/known_hosts exactly as the same byte sequence as it was given to ssh. So if I use a latin1 terminal to connect to an accented host, and later I use an utf-8 terminal then it's not recognized to be the same host, actually, it is added once again to known_hosts with a different encoding. It's even possible theoretically that two different hosts from two terminals using different encodings conflict each other in this file. So I'd recomment to always use utf-8 when storing host names in files, regardless of the current locale. - When I have latinX terminal, everything is fine now. However, in UTF-8 terminal I see this: $ ssh óx The authenticity of host 'óx' (...)' can't be established. ^^ this is okay RSA key fingerprint is ... Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '\303\263x' (RSA) to the list of known hosts. ^^^^^^^^ this is not okay ... ... Connection to óx closed. ^^ okay again So that \ooo escaping should be removed. I hope you don't find it a silly request.
Created attachment 640 [details] my really quick-and-dirty patch
We won't support setlocale() until OpenBSD gets support for it, hopefully this will be in the coming { days -> months }
(In reply to Damien Miller from comment #2) > We won't support setlocale() until OpenBSD gets support for it, > hopefully this > will be in the coming { days -> months } According to http://www.openbsd.org/cgi-bin/man.cgi?query=setlocale&sektion=3, OpenBSD supports setlocale(). Can we have IDN now, please? :) If there’s any way I can help, let me know.