How do I configure SFTP on FreeNAS?

3

2

Well, how do I configure SFTP on FreeNAS to be secure? My goal would be to get access to certain folders on my FreeNAS with a SFTP client like FireFTP.

I'm using 0.7.2 Sabanda (revision 5462).

The part I am the most unsure about is the Certificate. I'm not sure how to generate a key.

Tim

Posted 2010-11-25T11:21:04.723

Reputation: 602

Did you perhaps mean "FTPS" instead? – Ignacio Vazquez-Abrams – 2010-11-25T11:41:14.197

Answers

4

  1. Go to your FreeNAS web interface and browse to Services > SSH.
  2. Check the box labeled Enable and configure your settings to your liking, or leave as default.
  3. Click Save and Restart.
  4. Using your preferred SFTP client (e.g. I use FileZilla), connect to sftp://yourserver.com/.

Ryan

Posted 2010-11-25T11:21:04.723

Reputation: 171

1

If you really do mean "SFTP" then you don't even need a certificate; simply enable it in the SSH daemon running on the system.

Ignacio Vazquez-Abrams

Posted 2010-11-25T11:21:04.723

Reputation: 100 516

Aha, to enable SFTP all I need is to enable SSH? Is all communication now encrypted with SSH, or just FTP? I mixed SSL and SSH up, I guess. What benefits do I get when using SSL with FTP? – Tim – 2010-11-25T12:16:25.480

2Only SSH communication (which includes SFTP, since it piggybacks on top of SSH) will be encrypted. FTP will still be unencrypted. FTPS is fairly rare in the wild, so I wouldn't worry about setting it up unless you know you need it. – Ignacio Vazquez-Abrams – 2010-11-25T12:20:33.413

Just to be clear. Is FTPS, FTP on SSL? I'm not sure what you mean. Is the FTP unencrypted, even now when SSH is enabled? Or does the FTP become SFTP after enabling SSH? – Tim – 2010-11-25T12:29:28.820

2FTPS is indeed FTP-over-SSL. FTP and SFTP have nothing to do with each other; they are separate, independent protocols. – Ignacio Vazquez-Abrams – 2010-11-25T12:34:36.417

Okey, now it's beginning to clear up. But back to the main question. I cant find anything about SFTP in the SSH Service part of the FreeNAS GUI. How do I use the SSH daemon running on the system? – Tim – 2010-11-25T12:43:35.540

FreeNAS is FreeBSD-based, so it probably uses OpenSSH. Check /etc/ssh/sshd_config (or something similar) and see if there's a line that reads something like Subsystem sftp /usr/libexec/openssh/sftp-server. – Ignacio Vazquez-Abrams – 2010-11-25T12:46:08.797

Ok, gonna need to learn to use the system be command-line better first I guess. I cant even install a rar-file extractor. Totally n00b on Unix-like-systems :/. Thanks! – Tim – 2010-11-25T12:48:56.533

All I managed to do so far is to use the command-line with Putty over SSH. But it's a start I guess. – Tim – 2010-11-25T12:50:01.757

Of course, you could always just try to connect via SFTP. That will tell you real quick. – Ignacio Vazquez-Abrams – 2010-11-25T12:50:06.987