Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#12790 - Crazy welcome message escaping in openssh client

Attached to Project: Arch Linux
Opened by Tomas Mudrunka (harvie) - Wednesday, 14 January 2009, 15:37 GMT
Last edited by Hugo Doria (hdoria) - Saturday, 21 March 2009, 21:36 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: ssh welcome message is escaped too much ;)

Additional info:
* package version(s)
core/openssh 5.1p1-2

Steps to reproduce:
You can compare output of ssh on arch and debian (or any other system):


[harvie@harvie-ntb ~]$ ssh 192.168.2.163
___ ___ __
/ | \\ _____ _______ ___ __|__| ____
/ ~ \\\\__ \\ \\_ __ \\\\ \\/ /| |_/ __ \\
\\ Y / / __ \\_ | | \\/ \\ / | |\\ ___/
\\___|_ / (____ / |__| \\_/ |__| \\___ >
\\/ \\/ \\/
Harvie's server
Debian GNU/Linux 4.0 (Etch)
Pentium III (Coppermine) - 933MHz
512 MB Ram

harvie@192.168.2.163's password:
harvie@harvie-srv:~$ ssh localhost
___ ___ __
/ | \ _____ _______ ___ __|__| ____
/ ~ \\__ \ \_ __ \\ \/ /| |_/ __ \
\ Y / / __ \_ | | \/ \ / | |\ ___/
\___|_ / (____ / |__| \_/ |__| \___ >
\/ \/ \/
Harvie's server
Debian GNU/Linux 4.0 (Etch)
Pentium III (Coppermine) - 933MHz
512 MB Ram

harvie@localhost's password:
This task depends upon

Closed by  Hugo Doria (hdoria)
Saturday, 21 March 2009, 21:36 GMT
Reason for closing:  Upstream
Comment by Aaron Griffin (phrakture) - Wednesday, 14 January 2009, 17:27 GMT
flyspray doesn't do this very well... could you attach screenshots of each?
Comment by Tomas Mudrunka (harvie) - Friday, 16 January 2009, 12:05 GMT
every (fore)slash is doubled... i didn't noticed any other difference...
Comment by Aaron Griffin (phrakture) - Friday, 16 January 2009, 22:29 GMT
Is this an ssh motd file, or some bashrc script? Please post the contents here so I can play with it
Comment by Tomas Mudrunka (harvie) - Friday, 16 January 2009, 22:57 GMT
The motd is loaded from /etc/issue.net (on server side of course) and it should be passed directly to the terminal without any escaping or modifiing.
Note that server is not Arch, but it works on any other systems/clients (including scp or putty for windows and symbian)...
Comment by Tomas Mudrunka (harvie) - Friday, 16 January 2009, 23:02 GMT
there is screenshot...
Comment by eliott (cactus) - Saturday, 17 January 2009, 00:18 GMT
the target is a debian box?
I predict terminfo goofery.

What is you TERM value set to when you are logged in locally, and remotely?
echo $TERM
ssh foo
echo $TERM
Comment by Tomas Mudrunka (harvie) - Saturday, 17 January 2009, 00:29 GMT
i don't think so:

[harvie@harvie-ntb ~]$ echo $TERM
xterm
[harvie@harvie-ntb ~]$ ssh harvie.cz
harvie@harvie-srv:~$ echo $TERM
xterm
Comment by Tomas Mudrunka (harvie) - Sunday, 22 February 2009, 01:38 GMT
It's 100% not related to debian.
I configured sshd on Arch the same way like on debian:

<pre>
[harvie@harvie-ntb ~]$ cat /etc/ssh/sshd_config | grep -i banner
# no default banner path
Banner /etc/issue.net
[harvie@harvie-ntb ~]$ cat /etc/issue.net
___ ___ __
/ | \ _____ _______ ___ __|__| ____
/ ~ \\__ \ \_ __ \\ \/ /| |_/ __ \
\ Y / / __ \_ | | \/ \ / | |\ ___/
\___|_ / (____ / |__| \_/ |__| \___ >
\/ \/ \/
Harvie's laptop

[harvie@harvie-ntb ~]$ ssh localhost
___ ___ __
/ | \\ _____ _______ ___ __|__| ____
/ ~ \\\\__ \\ \\_ __ \\\\ \\/ /| |_/ __ \\
\\ Y / / __ \\_ | | \\/ \\ / | |\\ ___/
\\___|_ / (____ / |__| \\_/ |__| \\___ >
\\/ \\/ \\/
Harvie's laptop
</pre>
Comment by Tomas Mudrunka (harvie) - Sunday, 22 February 2009, 01:40 GMT
oh... you can view correctly formated banner in source of this page using monospace font...
Comment by Tomas Mudrunka (harvie) - Sunday, 22 February 2009, 10:45 GMT
since lenny there's the same bug in debian, so it looks like upstream bug and i will try to report it upstream...
debian-ssh@lists.debian.org/msg04530.html"> http://www.mail-archive.com/debian-ssh@lists.debian.org/msg04530.html

Or there can be done some kind of patch for it.
Maybe there is GLOB_NOESCAPE missing somewhere in sources...

[harvie@harvie-ntb src]$ fgrep -Ri backslash .
./openssh-5.1p1/sshd.0: backslash. This option might be useful to restrict certain pub-
./openssh-5.1p1/sftp.1:must be escaped with backslashes
./openssh-5.1p1/sshd.8:A quote may be included in the command by quoting it with a backslash.
./openssh-5.1p1/ChangeLog: double-quote string with backslash escaped /
./openssh-5.1p1/ChangeLog: remove extra backslash at the end of RB_PROTOTYPE, report from
./openssh-5.1p1/sftp.0: backslashes (`\').
./openssh-5.1p1/openbsd-compat/glob.h:#define GLOB_NOESCAPE 0x1000 /* Disable backslash escaping. */
./openssh-5.1p1/contrib/cygwin/README: separated by a backslash.
[harvie@harvie-ntb src]$ nano ./openssh-5.1p1/openbsd-compat/glob.h
[harvie@harvie-ntb src]$ fgrep -Ri GLOB_NOESCAPE .
./openssh-5.1p1/ChangeLog: GLOB_NOESCAPE is POSIX so move it out of the #ifndef _POSIX_SOURCE
./openssh-5.1p1/openbsd-compat/glob.c: if (flags & GLOB_NOESCAPE)
./openssh-5.1p1/openbsd-compat/glob.h:#define GLOB_NOESCAPE 0x1000 /* Disable backslash escaping. */
Comment by Tomas Mudrunka (harvie) - Sunday, 22 February 2009, 16:11 GMT

Loading...