IETF-SSH archive

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

Unimplementability [was Re: adding IUTF8 to encoded terminal modes in SSH Protocol Assigned Numbers]



>> ...this is just as well, actually, because ssh as specified is
>> basically unimplementable on many - most? - Unix variants.
> Hm?  That seems fairly surprising, given that we had what claimed to
> be working implementations before we ever finished the specs.
> Perhaps you'd care to elaborate (maybe in a new thread) ?

The basic problem is that various strings are specified as being UTF-8,
but things in question are things that the systems in question don't
store as character strings, but rather as octet strings.  This means
that either an ssh implementation has to have some configuration switch
telling it what the string encoding is in use or it will conform only
if the local admins stick to UTF-8 for those things.  (In some cases
it's conceptually possible to make the encoding setting user-specific,
but in other cases, such as usernames, it's not.)  There _is_ a third
option, sort of, in that the implementation can pretend that anything
that doesn't stick to the ASCII range - or, perhaps, which isn't a
valid UTF-8 string - doesn't exist, but that's really just a hardcoded
version of the "encoding in use is ASCII" (or "...is UTF-8")
configuration, combined with a particular error recovery technique upon
seeing octet sequences which are invalid for that encoding.

In moussh's case, I chose to treat those things as opaque octet
strings.  If the local system does not use UTF-8 for such things,
moussh will not conform to ths spec.  (This is outlined in moussh's
documentation, of course.)

Actually, it's not quite unimplementable.  The "reject anything
non-ASCII" technique sketched above would lead to conformant
implementation.  (One that could reasonably be seen has having a
quality-of-implementation defect, but it would conform.)

I don't know what implementations other than moussh do.  I just had a
look at the sshd_config manpage on one NetBSD machine, which gives me
some reason to think that OpenSSH (that being what that NetBSD version
provides) doesn't have an encoding setting.  This means either I missed
something (always a possibility), or it treats the relevant strings as
octet strings rather than character strings (and thus, like moussh,
does not conform unless the system uses UTF-8 for all such strings), or
it has some encoding assumption (ASCII? UTF-8? 8859-1?) effectively
hardwired into the code.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B



Home | Main Index | Thread Index | Old Index