SnapOverflow

SnapOverflow Logo SnapOverflow Logo

SnapOverflow Navigation

  • Home
  • Server
  • Ubuntu

Mobile menu

Close
  • Home
  • System Administrators
    • Hot Questions
    • New Questions
    • Tags
  • Ubuntu
    • Hot Questions
    • New Questions
    • Tags
  • Help
Home / server / Questions / 74176
Accepted
Daniel
Daniel
Asked: 2009-10-14 11:56:17 +0800 CST2009-10-14 11:56:17 +0800 CST 2009-10-14 11:56:17 +0800 CST

What port does SFTP use?

  • 772

Does SFTP use port 21 or port 22?

sftp
  • 6 6 Answers
  • 1261780 Views

6 Answers

  • Voted
  1. Best Answer
    Jeremy Bouse
    2009-10-14T12:39:53+08:002009-10-14T12:39:53+08:00

    While TCP port 22 is the general right answer, this is dependent on the fact that SSH is configured to use the standard port and not an alternative port.

    As SFTP runs as a subsystem of SSH it runs on whatever port the SSH daemon is listening on and that is administrator configurable.

    • 235
  2. Martin Vobr
    2010-08-07T08:52:41+08:002010-08-07T08:52:41+08:00

    SFTP usually uses port 22 but can be configured to run on nearly any port.

    Port 22 is generally used for connection via SSH. SFTP is just one of protocols which can be run over SSH (others include virtual terminal). In fact, the SFTP is independent and can be run even without using SSH.

    SFTP is sometimes called "Secure FTP" which leads to a common confusion with FTPS (which is called "Secure FTP" too).

    Generally:

    SFTP - SSH File Transfer Protocol - usually runs over TCP port 22

    FTP - plain, old file transfer protocol - usually runns over TCP port 21 (+ opens separate ports for data transfer)

    FTP/SSL - FTP over TLS/SSL channel.

    FTPS - same as FTP/SSL

    Secure FTP - either SFTP or FTPS

    More info:

    • INFO: Secure FTP, FTP/SSL, SFTP, FTPS, FTP, SCP... What's the difference?
    • Wiki: SSH File Transfer Protocol
    • Wiki: SFTP
    • Wiki: FTPS
    • 117
  3. Michael Pobega
    2009-10-14T14:23:04+08:002009-10-14T14:23:04+08:00

    It uses whatever port SSH is setup to use.

    • 13
  4. Kevin Stacey
    2009-10-14T11:58:34+08:002009-10-14T11:58:34+08:00

    Its uses Port 22.

    • 9
  5. TymexComputing
    2020-07-31T01:07:07+08:002020-07-31T01:07:07+08:00

    @Paul A. Jungwirth Good question about 115. I think it states decimal 115 as that's an older, unsecure version of SFTP protocol, before SSH had been invented - from 1984 Simple File Transfer Protocol - https://www.rfc-editor.org/rfc/rfc913#page-1

    SSH only suggests TCP:22 - but it's not required by any NAT algorithms like FTP does so it can be any port that admin sets up. Port 22 is only the default used in most installations.

    • 0
  6. user232319
    2014-07-11T21:28:12+08:002014-07-11T21:28:12+08:00

    SFTP will also use data ports at higher ranges. SSH will remain the control port. It uses more than 22 in most instances...

    • -9

Sidebar

Stats

  • Questions 681965
  • Answers 980273
  • Best Answers 280204
  • Users 287326
  • Popular
  • Answers
  • Marko Smith

    Ping a Specific Port

    • 18 Answers
  • Marko Smith

    What port does SFTP use?

    • 6 Answers
  • Marko Smith

    Resolve host name from IP address

    • 8 Answers
  • Marko Smith

    How can I sort du -h output by size

    • 30 Answers
  • Marko Smith

    Command line to list users in a Windows Active Directory group?

    • 9 Answers
  • Marko Smith

    What's the command-line utility in Windows to do a reverse DNS look-up?

    • 14 Answers
  • Marko Smith

    How to check if a port is blocked on a Windows machine?

    • 4 Answers
  • Marko Smith

    What port should I open to allow remote desktop?

    • 9 Answers
  • Marko Smith

    What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats?

    • 3 Answers
  • Marko Smith

    How to determine if a bash variable is empty?

    • 15 Answers
  • Martin Hope
    Davie Ping a Specific Port 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    Deepak Mittal How to run a server on port 80 as a normal user on Linux? 2008-11-11 06:31:11 +0800 CST
  • Martin Hope
    MikeN In Nginx, how can I rewrite all http requests to https while maintaining sub-domain? 2009-09-22 06:04:43 +0800 CST
  • Martin Hope
    Tom Feiner How can I sort du -h output by size 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    0x89 What is the difference between double and single square brackets in bash? 2009-08-10 13:11:51 +0800 CST
  • Martin Hope
    kch How do I change my private key passphrase? 2009-08-06 21:37:57 +0800 CST
  • Martin Hope
    Kyle Brandt How does IPv4 Subnetting Work? 2009-08-05 06:05:31 +0800 CST
  • Martin Hope
    Noah Goodrich What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent How to determine if a bash variable is empty? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus How do you find what process is holding a file open in Windows? 2009-05-01 16:47:16 +0800 CST

Related Questions

Trending Tags

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Home
  • Questions
    • Hot Questions
    • New Questions
  • Tags
  • Help

Footer

SnapOverflow

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Help

© 2022 SOF-TR. All Rights Reserve