This question already has an answer here:

I have seen this answer and it just tells the difference between SFTP and VPN ftp.

But I am asking for How exactly SFTP works? The first SSH make a secure tunnel but then how do I use FTP?

marked as duplicate by Steffen Ullrich, Rory Alsop Jun 21 '18 at 13:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Before I answer, I believe you have a misunderstanding of the difference between SFTP & FTPS, because FTP doesn't just become SFTP.

The link Matthew provided SFTP, FTPS and SecureFTP differences and security implications will be helpful in clearing up your misunderstandings. Alternatively, you can view Securing FTP with TLS and SSH File Transfer Protocol

As you've stated SFTP first creates a secure channel between the two parties. They then must both authenticate to this channel upon authenticating it acts the same way as FTP does with a client & a server it's just the data is being transversed across the secure channel rather than across an insecure channel the data is encrypted in transit and SFTP provides integrity checks to make sure it's not been tampered with.

SFTP Connection

Not the answer you're looking for? Browse other questions tagged or ask your own question.