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.

I need to connect to a CentOS 6 server via SFTP. What are the requirements to make or accept SFTP connections?

I think I need to have OpenSSL installed, along with SSL certificates installed in both servers, but would like to know what else is required.

share|improve this question
1  
You don't need OpenSSL or mod_ssl for SFTP. SFTP uses SSH, not SSL. –  David Schwartz Oct 15 '12 at 4:48
    
You do need OpenSSL install ... –  user1179459 Oct 15 '12 at 23:20
    
I've certainly never had a server where SSH/SFTP worked properly with a broken SSL package. –  Magellan Oct 16 '12 at 2:22

1 Answer 1

up vote 2 down vote accepted

You do need to have openssl installed, as sshd (which provides sftp) relies on it:

[me@lory ~]$ ldd /usr/sbin/sshd
[...]
    libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007ff3414d1000)
[...]
[me@lory ~]$ rpm -qf /usr/lib64/libcrypto.so.10
openssl-1.0.0-25.el6_3.1.x86_64

The good news is that the package manager on the CentOS server will take care of that (it's almost certainly installed already; if it's not, sudo yum install openssh-server). You also don't need to manually install or generate any certificates on the server; sshd will do that for itself, the first time it's started up. The first time you connect to a new server from your client, your client will ask if you want to trust and cache the server's public key (certificate); that's the step at which you confirm you're really connected to the right server, and provides the web of trust which substitutes for certification authorities in the ssh view of the world.

You will need an ssh client on your desktop, but since you don't say what platform that it, it's hard to make a recommendation. You may also need to enable SFTP functionality in your server's sshd, with something in /etc/ssh/sshd_config that looks like

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

but, again, check that's not already there before starting to edit configs.

share|improve this answer

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.