openssh-SNAP-20001207 scp "Bad file descriptor" sort-of work-around

Richard E. Silverman res at shore.net
Sat Dec 9 15:55:31 EST 2000


On Fri, 8 Dec 2000, James wrote:

> Ugh!  I'd think bash should read different startup files when invoked by a
> remote shell daemon and when invoked as a non interactive shell.

How would you suggest it tell the difference?

> Is sending random text to a remote shell daemon really such a bad thing
> that ssh and scp couldn't be made to simply pass through the text?

The issue is that if you do "ssh/rsh/whatever host command", you expect to
see only the output from the command on stdout.  Greetings, motd files,
etc. are only appropriate for an interactive session, where there's a
human on the other side to interpret them.  A non-interactive session is
probably one program talking to another, and the random text simply screws
up whatever protocol they're speaking.  It's more reasonable to expect a
transparent, unpolluted connection, than to expect that every pair of
programs you might want to connect together using SSH must try to
heuristically filter out stuff that "looks like unwanted text" from their
conversation.

-- 
  Richard Silverman
  slade at shore.net






More information about the openssh-unix-dev mailing list