Difference between SFTP and SSH?

This may be a dumb question, but can someone explain the fundamental difference between sending files over SFTP versus sending them via SSH?  The reason I ask, is because we currently have an FTP server configured to utilize both methods (over ports 21 and 22 respectively), but I can't find any discernible difference between the two.

Thanks in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent WSr. Network / Systems AdminCommented:
SSH is a secure (encrypted) remote shell protocol, meant for textual interaction, usually enacted over the tcp/ip control port 22.

SFTP (SSH File Transfer Protocol or Secure File Transfer Protocol) is a secure (encrypted) file transfer and access protocol, usually enacted over the tcp/ip control port 21, and is and extension of SSH.

SFTP is often confused with FTPS, which is an extension of FTP.
Dave BaldwinFixer of ProblemsCommented:
SFTP in my experience is usually on port 22 also.  I do have a couple of sites that put it on other ports but never on port 21.  Otherwise, I agree with mugojava.
blinkme323Author Commented:
Thanks for the answers thus far.  So if I'm correct, then SFTP is the actual secure protocol for sending the files, whereas SSH is the method of actually connecting to the desired endpoint?
Kent WSr. Network / Systems AdminCommented:
Correct, the "tunnel" for SFTP is via SSH.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
madunix (Fadi SODAH)Chief Information Security Officer Commented:

Secure Shell (SSH): A secure network protocol that allows data to be sent in a secured manner and that replaces Telnet, it's typically implemented between two parties by validating each other’s credentials via digital certificates. SSH is implemented at the application layer

SFTP (SSH File Transfer Protocol): A network protocol that provides file transfer and manipulation functionality over any reliable data stream. It is typically used with the SSH-2 protocol (TCP port 22) to provide secure file transfer, but is intended to be usable with other protocols as well.

Has a good standards background which strictly defines most (if not all) aspects of operations
Has only one connection (no need for a DATA connection)
The connection is always secured
The directory listing is uniform and machine-readable
The protocol includes operations for permission and attribute manipulation, file locking, and more functionality

The communication is binary and can not be logged “as is” for human reading
SSH keys are harder to manage and validate
The standards define certain things as optional or recommended, which leads to certain compatibility problems between different software titles from different vendors.
No server-to-server copy and recursive directory removal operations
No built-in SSH/SFTP support in VCL and .NET frameworks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSH / Telnet Software

From novice to tech pro — start learning today.