SSHD works fine but how do I enable the SFTP Subsystem in Redhat 5.2 Enterprise Linux? It seems to have a older version of SSHD that doesn't support some of the usual directives like Match or ChrootDirectory . So, does anyone have an example of how to do this on Redhat 5.2 (or CentOS 5.2?) ??

The file /usr/libexec/openssh/sftp-server is permissions 755.

I tried both of these in my /etc/ssh/sshd_config file:

#Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp  

But neither of them work. My psftp says:

psftp> open
login as: root
root@'s password:
bash: line 2: exec: sftp-server: not found
Fatal: unable to initialise SFTP: could not connect

2 Answers 2


Your SSH is most likely version 4.2, all that SFTP stuff is in version 4.9 from what I can tell. You will need to compile a newer version. The 5.2 RHEL server here is showing 4.2 for the OpenSSH version.

  • Do you think if I enable the "redhat network" repository, that the redhat network rpm repository would have a 5.x version of sshd to upgrade to?
    – djangofan
    Jan 26, 2012 at 20:03
  • If you mean the default RHEL repos, then I would say no. From some of the build instructions I have seen, I looked like there was new PAM libs required and such. Also my 4.2 version came from the default RHEL repos.
    – Tim
    Jan 26, 2012 at 21:12
  • Here is the build instructions I saw: binblog.info/2009/02/27/packaging-openssh-on-centos
    – Tim
    Jan 26, 2012 at 21:14

You need to run OpenSSL version 5.*+. The version in the repository for CentOS 5.2 does not support chrootdirectory, etc. I had to compile it from source, but there may be an RPM out there somewhere.

  • Thanks, thats a great thought "to try a CentOS version". Maybe I might resort to doing that.
    – djangofan
    Jan 26, 2012 at 20:04
  • You will probably need to look beyond the RHEL or CentOS repositories. They will both have the 4.2 version.
    – Craig
    Jan 26, 2012 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.