| Summary: | sftp fails to connect when login shell is t/csh and user's .cshrc generates output | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | dtkerns <david.t.kerns> | ||||
| Component: | sftp-server | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | trivial | CC: | djm, dtucker | ||||
| Priority: | P5 | ||||||
| Version: | 5.3p1 | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 2782 | ||||||
| Attachments: |
|
||||||
|
Description
dtkerns
2017-11-22 02:09:05 AEDT
sorry I typed the "wrapper" script for memory... should be: if ( `tty` != 'not a tty' ) then echo safe to echo endif having shell startups pollute stdin/stdout is a common problem for many tools, not just sftp. Adding shell-specific startup flags would require shell (and possibly platform) specific knowledge, and that's a rathole I am not willing to go down. There is also the possibility that something in the shell startup is actually desired (eg umask setting or something). It might be possible to give a hint in this case (similar to rsync's "is your shell clean?" message), but as you've discovered the best option right now is "so don't do that, then". ok, I'll settle for a better (eg is your shell startup output clean?) error message. If nothing else, this bug entry may help save the next guy a few hours of pulling out precious hair. :) Created attachment 3088 [details]
Output "(is your shell clean?)" for message too big only on initial request.
A variant of that patch was just committed. % echo "echo foo" >>.cshrc % sftp localhost Received message too long 1718578954 Ensure the remote shell produces no output for non-interactive sessions. I like it. Close all resolved bugs after release of OpenSSH 7.7. |