Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
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
[...] => /usr/lib64/ (0x00007ff3414d1000)
[me@lory ~]$ rpm -qf /usr/lib64/

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


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.