OpenSSH 3.6.1p1 on NCR MP-RAS v4.3, several weird terminal problems
Jay Libove
libove at felines.org
Wed Apr 9 04:24:10 EST 2003
I compiled OpenSSH 3.6.1p1 on NCR MP-RAS v4.3 (or at least
"uname -a"'s output of 4.0.3.0 suggests v4.3, I'm not positive).
I was able to compile zlib (1.1.4) and openssl (0.9.7a) with little
trouble.
OpenSSH took hand-hacking the includes.h file as follows:
diff -cr openssh-3.6.1p1/includes.h openssh-3.6.1p1-customized/includes.h
*** openssh-3.6.1p1/includes.h Sun Oct 20 20:50:26 2002
--- openssh-3.6.1p1-customized/includes.h Mon Apr 7 17:32:04 2003
***************
*** 104,110 ****
--- 104,114 ----
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h> /* For timersub */
#endif
+ #define _XOPEN_SOURCE
+ #define _XOPEN_SOURCE_EXTENDED 1
#include <sys/resource.h>
+ #undef _XOPEN_SOURCE_EXTENDED
+ #undef _XOPEN_SOURCE
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif
Other than that, things *appeared* to compile and install fine.
Then I logged in to this NCR MP-RAS machine using SSH (from Van Dyke's
SecureCRT v4.0.4) and saw this:
$ man ls | more
Cannot reopen stdout: No such device or address
$ PAGER=more
$ export PAGER
$ man ls
Cannot reopen stdout: No such device or address
Cannot reopen stdout: No such device or address
Even worse than the pipe problem: Control-C ANYWHERE - at the command
prompt, while a command is running, inside 'vi', anywhere - will kill the
SSH connection completely! Ick...
$ ssh -l username MP-RAS_host
username at MP-RAS_host's password: ********
<login banners and motd>
$ ^C
Connection to MP-RAS_host closed by remote host. Connection to MP-RAS_host
closed.
One more thing: on exiting the shell normally (pressing Control-D), the
SSH session does not fully close; I see "^D" displayed in the remote shell
and the shell has exited, but the actual remote connection from the SSH
client to the SSH server remains open until killed.
$ ssh -l username MP-RAS_host
username at MP-RAS_host's password: ********
<login banners and motd>
$ ^D
<cursor goes down to the beginning of the next line .. and just sits there
for longer than I'm willing to be patient, until I enter <CR>~. to close
it manually>
There's no job control when logged in under SSH:
$ ed
^Z
?
q
$
.. as compared to under telnet:
$ ed
^Z
[1] + Stopped
$ fg
ed
q
$
I logged in with telnet in another session (also from SecureCRT v4.0.4)
and compared some things:
* /dev/pts/xx have the same owner, group, and modes in the two sessions
* environments differ slightly:
+ Only the telnet session has
HZ=100
TIMEOUT=0
+ The PATH is slighly different, with the SSH session adding the
binary directory where OpenSSH is installed (/opt/openssh/bin),
and also inserting /bin (which the telnet session lacked)
SSH: PATH=/usr/bin:/bin:/usr/sbin:/sbin:/opt/openssh/bin:/usr/ccs/bin
Telnet: PATH=/usr/bin:/usr/sbin:/usr/ccs/bin
+ Only the SSH session contains:
SSH_TTY=/dev/pts/xx
SSH_CONNECTION="srcIP srcport dstIP dstport"
SSH_CLIENT="srcIP srcport dstport"
USER=jlibove
+ The MAIL variable in the SSH session has an extra '/' in it:
MAIL=/var/mail//jlibove
compared to the telnet session
MAIL=/var/mail/jlibove
None of these seem critical, though the MAIL setting does imply some
additional misunderstanding of NCR MP-RAS' peculiarities in by the OpenSSH
code.
I compared the output of "stty -a", and found the only difference to be
that the telnet session thought of itself as being on a 9600 baud
terminal, while the SSH session thought of itself as 38400 baud.
$ stty -a
speed 38400 baud;
rows = 34; columns = 80; ypixels = 0; xpixels = 0;
intr = ^c; quit = ^|; erase = ^h; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = <undef>;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -parext
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff -imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3
I have confirmed that these same problems occur when the client is
OpenSSH v3.1p1 on a Linux machine, so it is not related to the SecureCRT
client - it is definitely the way the OpenSSH code compiles/runs on the
NCR MP-RAS server.
Ideas and previous experience in getting OpenSSH to work correctly on NCR
MP-RAS will be most welcome!
Thanks
-Jay Libove, CISSP
libove at felines.org
More information about the openssh-unix-dev
mailing list