Protocol 1 not working in openssh-2.5.2p2
Anthon Yu
anthonyu at yahoo.com
Fri Apr 6 13:06:17 EST 2001
After upgrading to openssh-2.5.2p2, my users were
unable to login using ssh Protocol 1. Entries like
this were showing up in syslog:
Apr 5 19:29:45 maple sshd[16726]: Accepted password
for anthonyu from ::ffff:192.168.0.2 port 1019
Apr 5 19:29:45 maple sshd[16726]: fatal:
stat(/dev/pts/1 19:29:45 sshd[16726]: Accepted
password for anthonyu) failed: No such file or
directory
Apr 5 19:29:45 maple sshd[16726]: error: chown
/dev/pts/1 19:29:45 sshd[16726]: Accepted password for
anthonyu 0 0 failed: No such file or directory
Apr 5 19:29:45 maple sshd[16726]: error: chmod
/dev/pts/1 19:29:45 sshd[16726]: Accepted password for
anthonyu 0666 failed: No such file or directory
And, a quick test showed this when using ssh2:
Apr 5 19:32:07 original sshd[16821]: fatal: TTYNAME:
/dev/pts/1
As opposed to this when using ssh1:
Apr 5 19:32:25 original sshd[16823]: fatal: TTYNAME:
/dev/pts/1 19:32:25 sshd[16823]: Accepted password for
anthonyu
So I dont think it's a problem with ttyname(3).
Below is a workaround patch that allows logins, but I
doubt it will be useful in anything but
troubleshooting. YMMV. Please let me know if a proper
fix is committed.
Thanks,
diff -Nurd openssh-2.5.2p2-orig/sshpty.c
openssh-2.5.2p2/sshpty.c
--- openssh-2.5.2p2-orig/sshpty.c Sun Mar 4
19:53:03 2001
+++ openssh-2.5.2p2/sshpty.c Thu Apr 5 19:41:55
2001
@@ -296,6 +296,10 @@
gid_t gid;
mode_t mode;
struct stat st;
+ char *dex;
+
+ dex = index(ttyname, ' ');
+ *dex = 0;
/* Determine the group to make the owner of
the tty. */
grp = getgrnam("tty");
=====
--
Au
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
More information about the openssh-unix-dev
mailing list