error: subsystem: cannot stat /usr/libexec/openssh/sftp-server
Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
error: subsystem: cannot stat /usr/libexec/openssh/sftp-server
I have a RHEL 6.3 box running OpenSSH 5.3.
The box is set up as an SFTP server. I am using keypair and password authentication. When I attempt a connection, I always get the following error in /var/log/secure:
error: subsystem: cannot stat /usr/libexec/openssh/sftp-server: No such file or directory
I have verified that the file exists, and is executable by everyone.
I've also attempted moving the file to another location and updating my sshd_config file, and still got the error, but with the updated path.
I have updated OpenSSH to v5.3, and I'm still getting the same error.
When I attempt to connect from another linux box using the sftp command, I get the following error:
subsystem request failed on channel 0
Couldn't read packet: Connection reset by peer
However, if I attempt to connect using either Filezilla, or putty's psftp software, the connection is successful and I'm able to use the sftp server.
The file not found error on the subsystem file still occurs in the secure log, however.
Unfortunately, I can't just suggest another client in this case, since our client needs to script out automatic loads of a file via the command line sftp client.
I've searched google for hours and can only find folks who haven't verified file location, which was the first thing I checked.
Any assistance or guidance is very much appreciated!
Last edited by earwaxntoast; 03-06-2013 at 04:44 PM.
# override default of no subsystems
#Subsystem sftp /usr/libexec/openssh/sftp-server <---- comment this line out
Subsystem sftp internal-sftp <---- add this line
# override default of no subsystems
#Subsystem sftp /usr/libexec/openssh/sftp-server <---- comment this line out
Subsystem sftp internal-sftp <---- add this line
service sshd restart
Thanks to you two that took the time to reply.
cool, thx for the answer. An Update reset these settings and your solution saved me some more time to be wasted ^^
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.