[Bug 1273] Interactive mode detection should not be predicated on pty allocation

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Fri May 18 03:21:26 EST 2007


http://bugzilla.mindrot.org/show_bug.cgi?id=1273


John Caruso <jcaruso at arenasolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jcaruso at arenasolutions.com




--- Comment #2 from John Caruso <jcaruso at arenasolutions.com>  2007-05-18 03:21:23 ---
Yes, it was the "Connection to <host> closed" message that prompted me
to look into this, and it does strike me as a genuine (though clearly
not very important) bug.  For example, this should print the message
but doesn't:

% ssh -T user at my.host
user at my.host's password:
ls
myfile1
myfile2
uname -r
2.6.9-55.ELsmp
exit

And this should not print the message but does:

% ssh -t user at my.host "ls; uname -r"
user at my.host's password:
myfile1   myfile2
2.6.9-55.ELsmp
Connection to my.host closed.

And it doesn't make sense that this prints the message when the first
example doesn't:

% ssh -t user at my.host
user at my.host's password:
**** Welcome to my.host ****
$ ls
myfile1   myfile2
$ uname -r
2.6.9-55.ELsmp
$ exit
Connection to my.host closed.

It seems to me that the purpose of "Connection to <host> closed" is to
inform the user that after some variable number of commands and
responses, their session is now over.  If they specified a remote
command--even if it was passwd, or vi, or anything else that requires
some interaction--they already know that the connection is going to
close when the command that they specified has finished, and so they
don't need the message.

If you agree with that, I'd say that checking buffer_len(&command)==0
(or some equivalent, if that's not available in client_loop)--rather
than checking have_pty--is exactly the right solution.  I know the
message can be suppressed by setting the log level, but that's a
kludge, not a fix, and highly undesirable since it may suppress
important info.

Anyway, it's certainly your call if you want to stick with WONTFIX--I
just wanted to explain a bit more completely why I considered it a
(minor) bug.


-- 
Configure bugmail: http://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list