SSH Client Hangs after logging in to SSHD
Frank S. Bernhardt
frank at bcsi.ca
Wed Feb 13 06:46:05 EST 2002
Thanks for the patch.
I'm red-faced to say that I'm currently running openssh-2.3.0p1 with openssl-0.9.6. My motto
is "If it's working, leave it alone". I guess I could try to get 3.9.2p1 up and running. I
don't enjoy this "build stuff" as I'm a COBOL programmer, not a C programmer and it's always
quite painful and time consuming for me to get it working. I've given up on OpenUNIX 8 for
now. I've gotten it to the stage where I'm missing some library and have no clue as to where
to get it from (yes, I'm clueless). Anyway, it's not that important right now.
I'll keep you informed as to how I make out (please scan the obituaries on a regular basis).
Thanks again.
Roger Cornelius wrote:
> "Frank S. Bernhardt" (frank at bcsi.ca) wrote:
>
> >I'm not a ssh expert and I don't know if the log is good or bad, but I too am
> >running OpenSHH under OpenServer. I find that after I connect, the return key
> >has no effect unless I first type:
> >
> > stty sane <Ctrl>j
> >
> >If you've hit <ENTER> before that you must first press <Ctrl>j a couple of times
> >to clean out the buffer. After I type the above command, everything seems to
> >work ok. Interestingly when I connect from a Linux box using ssh I don't seem to
> >need to do this.
>
> My experience on SCO OpenServer has been that pre2.9 versions of OpenSSH
> had the above problem. Connecting to a 2.9 or later sshd with a pre 2.9
> ssh also had this problem. Do you fall in this category? I tested only
> between OpenServer boxes, so can't comment on Linux or others.
>
> Below is a patch to 3.0.2p1 session.c (sshd) which fixes the problem for
> me. Again, I've only tested between two OSR5 boxes. I'd be interested
> to know if it has any adverse affects on a linux (or other) box
> connecting to an OSR5 one.
>
> You'll need to either add -DSCO_OSR5 to --with-cflags when you run
> configure, or just remove the SCO_OSR5 ifdefs from the patch after
> applying it.
>
> Roger
>
> *** Orig/openssh-3.0.2p1/session.c Sat Dec 1 18:37:08 2001
> --- openssh-3.0.2p1/session.c Wed Jan 2 14:49:06 2002
> ***************
> *** 1622,1627 ****
> --- 1622,1634 ----
> {
> u_int len;
> int n_bytes;
> + #ifdef SCO_OSR5
> + /*
> + * needed only for compatibility w/pre 2.9 openssh versions which
> + * connect to our sshd
> + */
> + struct termios tio;
> + #endif /* SCO_OSR5 */
>
> if (no_pty_flag) {
> debug("Allocating a pty not permitted for this authentication.");
> ***************
> *** 1679,1684 ****
> --- 1686,1710 ----
>
> packet_done();
> session_proctitle(s);
> +
> + #ifdef SCO_OSR5
> + /*
> + * needed only for compatibility w/pre 2.9 openssh versions which
> + * connect to our sshd
> + */
> + if (tcgetattr(s->ptyfd, &tio) < 0)
> + log("Getting tty modes for pty failed: %.100s", strerror(errno));
> + else {
> + tio.c_lflag |= (ECHO | ISIG | ICANON);
> + tio.c_oflag |= (OPOST | ONLCR);
> + tio.c_iflag |= ICRNL;
> +
> + /* Set the new modes for the terminal. */
> + if (tcsetattr(s->ptyfd, TCSANOW, &tio) < 0)
> + log("Setting tty modes for pty failed: %.100s", strerror(errno));
> + }
> + #endif /* SCO_OSR5 */
> +
> return 1;
> }
>
>
> --
> Roger Cornelius rac at tenzing.org
--
Regards
Frank S. Bernhardt
b.c.s.i.
14 Halton Court
Markham, ON.
L3P 6R3
905-471-1691 Voice
905-471-3016 FAX
frank at bcsi.ca
More information about the openssh-unix-dev
mailing list