-1

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.

Magellan
  • 4,451
  • 3
  • 30
  • 53
mahen3d
  • 4,342
  • 14
  • 36
  • 57

1 Answers1

2

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.

MadHatter
  • 79,770
  • 20
  • 184
  • 232