5 ms·
I recently had a client order SFTP from me, I thought I had misread and asked if they meant FTPS (FTP with SSL) but they insisted that they wanted SFTP. This w
by INTPenis 11y ago
I recently had a client order SFTP from me, I thought I had misread and asked if they meant FTPS (FTP with SSL) but they insisted that they wanted SFTP.
This was a case where the client was quite informed and knew that they wanted encryption but that it would never work through a firewall so they ordered SFTP.
I was pleased about this but then came other challenges, MITM protection.
My solution was to use DNSSEC with SSHFP records. Unfortunately I can't guarantee that the client software supports it.
- masklinn 11y agoWouldn't SFTP MITM protection just be regular SSH MITM protection?
- INTPenis 11y agoYes it's the same thing, but nobody ever rolls out protection for SSH. It's just a bad habit. When I look at the ecosystem around me I see mostly tech people using SSH, while the case I described was one where ordinary end users wanted to use SFTP as they had been using FTP in the past. So I suddenly felt a more urgent need for MITM protection. With techs I guess the responsibility is often shifted onto them to keep track of their known hosts.
- kba 11y agoWhy would you assume they wanted FTPS? SFTP is both more common and very superior. Also, what MITM attacks are you afraid of with SFTP?
- icebraining 11y agoYou can use regular TLS CA-signed certificates with FTPS, but not with SFTP.
- dozzie 11y agoExcept yes, you can use CA-signed certificates with SFTP.
- icebraining 11y agoYou can? And it validates the CA signature? How?
- dozzie 11y agoAccordingly: yes, yes, by using appropriate cryptographic algorithm.
- icebraining 11y agoI'm not saying one couldn't in theory implement that, but is that actually implemented? Is there any SSH server that accepts an X509 certificate and a client that accepts a database of CA root certs and checks the server cert?
- dozzie 11y ago> I'm not saying one couldn't in theory implement that, but is that actually implemented? I'm not talking about theory here. I'm talking about what OpenSSH can do. > Is there any SSH server that accepts an X509 certificate and a client that accepts a database of CA root certs and checks the server cert? Actually, it may not be X.509 per se. I'm not sure if OpenSSH uses precisely X.509 PKI or if it rolls out its own CA implementation, because I don't use this function. I've read somewhere it's the latter case.
- creshal 11y ago> Also, what MITM attacks are you afraid of with SFTP? SFTP, like SSH, is "trust on first use". If you don't have some out-of-band mechanism in place to verify the server fingerprint, you're going to have a bad time. While the CA system isn't perfect, rolling out your own CA to clients is easily automated and verifying certificates from that point on happens automatically.
- anc84 11y agoIf a client orders SFTP providing off-band fingerprints is a trivial step.
- creshal 11y agoIf that client is a single person, sure. If the client is a 500 person organization where half need access to the server, I can see why people would prefer FTPS with a certificate from their internal CA.
- frutiger 11y agoYou can do SSH certificates that can sign and revoke keys. For some reason, most people assume TLS when you mention the word certificate. Read the CERTIFICATES section in ssh-keygen(1).
- creshal 11y agoTrue, but you still need to build your own infrastructure to roll out the CA, vs. X.509, which is implicitly handled by all OSes.
- deleted 11y ago[deleted]