Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 000.000.00.00
login as: root
root@000.000.00.00's password:
bash: line 2: exec: sftp-server: not found
Fatal: unable to initialise SFTP: could not connect
psftp>
share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

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.

share|improve this answer
    
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 '12 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 '12 at 21:12
    
Here is the build instructions I saw: binblog.info/2009/02/27/packaging-openssh-on-centos –  Tim Jan 26 '12 at 21:14
add comment

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.

share|improve this answer
    
Thanks, thats a great thought "to try a CentOS version". Maybe I might resort to doing that. –  djangofan Jan 26 '12 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 '12 at 20:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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