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

Rob Hagopian rob at hagopian.net
Mon Dec 11 10:36:05 EST 2000


Is it really that tough?

One algorighm I can think of off the top of my head is to keep pulling
lines of text from the client until it finds a line containing only an scp
"magic cookie". From there negotiations continue as expected.

In fact, sendmail works somewhat like this, you can connect to port 25,
type whatever you want, and sendmail will ignore most all of this until it
gets a HELO line...

Of course, the existing protocol specs may not allow for something like
this (?)...
								-Rob

On Fri, 8 Dec 2000, Richard E. Silverman wrote:

> 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.
> 
> 







More information about the openssh-unix-dev mailing list