Bug 166750 - kio_sftp doesn't work to servers with a "Banner" configured
Summary: kio_sftp doesn't work to servers with a "Banner" configured
Status: RESOLVED NOT A BUG
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: sftp (show other bugs)
Version: unspecified
Platform: Mandriva RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Dawit Alemayehu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-16 17:59 UTC by Buchan Milne
Modified: 2013-06-23 05:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Buchan Milne 2008-07-16 17:59:52 UTC
Version:            (using KDE 3.5.9)
Installed from:    Mandriva RPMs
OS:                Linux

I noticed that sftp URLs in KDE were working to some machines in our environment, but not others. I noticed that the difference between the machines where sftp URLs worked and those that didn't was that the machines which had our new security policies applied did not work. One of the changes effected by the security policy is to mandate a "Banner", configured as "Banner /path/to/banner" in sshd_config. This results in motd-like text being sent to stderr when connecting to a server via ssh.

On one machine which I could not use sftp URLs to, I disabled the Banner configuration and restarted sshd, and immediately afterwards, sftp URLs to it worked.

One possible fix may be to ignore any text sent to stderr by the process used to initiate the sftp connection?
Comment 1 Buchan Milne 2008-07-21 13:56:40 UTC
BTW, same behaviour on KDE 4.1rc1(?) (kdebase4-4.0.98-2mdv2009.0)
Comment 2 Dawit Alemayehu 2009-03-08 08:28:57 UTC
Sorry for the late response to your report... How long are these banners ? I cannot reproduce it, but I tested with a 3 line banner only.
Comment 3 Dawit Alemayehu 2009-03-10 05:56:55 UTC
I now tested with a larger banner message. I also deliberately added words like login: and password: to see if I can duplicate the issue, but I cannot. The ssh version I tested with 

$ ssh -V
OpenSSH_5.1p1 Debian-3ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
Comment 4 Buchan Milne 2009-03-10 08:19:14 UTC
This is the banner (it includes the 2 lines of asterisks):
***************************************************************************
                            NOTICE TO USERS


This computer system is the private property of Our Company -
security@ourcompany.com, whether individual, corporate or government.
It is for authorized use only.  Users (authorized or unauthorized) have no
explicit or implicit expectation of privacy.

Any or all uses of this system and all files on this system may be
intercepted, monitored, recorded, copied, audited, inspected, and
disclosed to your employer, to authorized site, government, and law
enforcement personnel, as well as authorized officials of government
agencies, both domestic and foreign.

By using this system, the user consents to such interception, monitoring,
recording, copying, auditing, inspection, and disclosure at the
discretion of such personnel or officials.  Unauthorized or improper use
of this system may result in civil and criminal penalties and
administrative or disciplinary action, as appropriate. By continuing to
use this system you indicate your awareness of and consent to these terms
and conditions of use. LOG OFF IMMEDIATELY if you do not agree to the
conditions stated in this warning.

****************************************************************************

I have tested with:
$ ssh -V
OpenSSH_5.1p1, OpenSSL 0.9.8h 28 May 2008
(Mandriva 2009.0 x86_64, KDE 4.1.3)
and

$ ssh -V
OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006
(Red Hat Enterprise Linux 5.3, x86_64, KDE 3.5.4)
Comment 5 Dawit Alemayehu 2013-06-23 05:40:11 UTC
kio_sftp has been rewritten using libssh and as such should no longer have this problem. Feel free to reopen if that is not the case.