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! |
What is the output of the following on the file?
Code:
lsattr Also, is selinux enabled? |
Thanks for taking the time to reply.
Here's the result of your commands. I also threw in a locate since it was the last thing I did before your stuff: Code:
[root@pvm269 openssh]# locate sftp-server Code:
[root@pvm269 openssh]# sestatus |
sorry, missed the stat:
Code:
[root@pvm269 openssh]# stat sftp-server |
Hmmm; given you've got SELinux as Permissive (risky) it shouldn't affect things, but FYI on my Centos 6.3
Code:
ls -alZ |
Just to update this thread, the solution was:
# 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. |
thx
Quote:
|
All times are GMT -5. The time now is 07:15 PM. |