#568108 /usr/bin/ssh: Wrong characters accepted between UTF-8 server and UTF-8 client using Banner

Package:
openssh-client
Source:
openssh
Description:
secure shell (SSH) client, for secure access to remote machines
Submitter:
Pavel Vávra
Date:
2010-02-02 19:18:07 UTC
Severity:
normal
#568108#5
Date:
2010-02-02 14:02:36 UTC
From:
To:
Hallo,
  I am using ssh client to log to another machines. Using Banner option (pointed to /etc/issue.net at server side) brings strange results using non-ascii characters in invitation text:

user@pom64:~$ ssh netman@xxx.xxx.xxx.xxx
Debian GNU/Linux 5.0
---
\304\233\305\241\304\215\305\231\305\276\303\275\303\241\303\255\303\251
---
netman@xxx.xxx.xxx.xxx's password:
Linux lanmgr 2.6.26-2-amd64 #1 SMP Thu Nov 5 02:23:12 UTC 2009 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Xxx Xxx  xx xx:xx:xx 2010 from xxx.xxx.xxx.xxx

Well, text has been a bit coded .... but trying to show this text after logging works fine, look at:

netman@lanmgr:~$ cat /etc/issue.net
Debian GNU/Linux 5.0
---
ěščřžýáíé
---
netman@lanmgr:~$

It looks like strange issue when client doesn't expect UTF-8 coding before loging in. Just a note about lanmgr's installation: it is fresh installation of Lenny without any obsolete config files.

I really do not understand why UTF-8 client doesn't understand UTF-8 server and interprets UTF-8 characters by wrong way.

Could you please check this example and try to repare it? I am not sure, but I think, that similar situation in etch distribution (with another server) work fine, but upgrade to Lenny breaks it.

Thank you for your help,
  Pavel

#568108#10
Date:
2010-02-02 18:01:25 UTC
From:
To:
reassign 326027 openssh-client openssh/1:3.8.1p1-8.sarge.4
severity 326027 normal
user openssh@packages.debian.org
usertags 326027 = ssh
merge 326027 568108
thanks

Thanks for your report.  I think this is basically the same type of
issue as reported in #326027, although the symptoms might be a little
different.

#568108#17
Date:
2010-02-02 18:54:42 UTC
From:
To:
Hallo Colin,
  you can be right, but ... when server in my case send file as is, it -of course- should be encoded as required. But client try to decode it instead of just displaying it.

Regards,
  Pavel

On Tue, 2 Feb 2010 18:01:25 +0000 Colin Watson <cjwatson@debian.org> wrote: