SFTP Authentication (2024)

Author: Conrad Chung, 2BrightSparks Pte. Ltd.

This article discusses the basics of what SFTP is and the various authenticating methods in which a user can use to connect to an SFTP server (depending on how the server is set up). In addition, we will be discussing how a connecting client can check to ensure the SFTP server is authentic.

To transfer files securely using SFTP, you will need to use a client that supports the Secure Shell (SSH) protocol, like the PC backup & synchronization program - SyncBackPro. Note that SyncBackFree and SyncBackSE do not support SFTP, and while SyncBackSE supports the FTPS protocol, it is unrelated to SFTP.

SSH in SFTP Servers is an encrypted network protocol that uses public key cryptography to create a more secure method to authenticate a client’s identity and rights to access a server.

In SSH, there are two sets of public/private key pairs (or four keys), which are:

  • User (Client) Public Key
  • User (Client) Private Key
  • Host (Server) Public Key
  • Host (Server) Private Key

The user’s Public & Private Keys are a pair of keys used to authenticate a client when it connects to an SFTP server. The user’s private key is kept secret and stored locally on the user’s PC while the user’s public key is uploaded and registered on the SFTP server the user connects to. The server’s public key (commonly known as the host key) is sent to connecting clients for validation and ensure the SFTP server they are connecting to is the correct server. The server’s private key is only used internally by the SFTP server/server admin and is not used by end-users.

Validation of the Server Public (Host) Key

A host key is the SFTP server’s public key. Ensuring the SFTP server is validated is an important aspect of the SFTP protocol. It is designed to protect against man-in-the-middle attacks where the hacker intercepts and relays an impersonated message to the other party. Host key validation ensures the FTP server that a client is connecting to is verified as the correct one. When the client connects to the server, the server’s public key is returned and the client may be prompted to accept the host key (if connecting for the first time). Once accepted, this key will be stored within the client, which will then be used to check if the Host key matches each time it connects to the SFTP server.

Note that host key validation is performed prior to any client authentication process starts, which only takes place if the server validation is successful, otherwise the connection will be aborted.

Important Note - the Host key (server’s public key) is different from the user’s public key. The former (host key) is used to validate the server’s identity by the client while the latter is used by a client to authenticate and login to an SFTP server.

When SyncBackPro connects to an SFTP server for the first time with host key validation enabled, you may be prompted with a message like this:

SFTP Authentication (1)

A hash fingerprint of the host key is displayed to the client. The user should use a secure method to verify the host key and ensure it matches the correct SFTP server. Once the server is verified and the host key is accepted, it is saved by the SFTP client so it can be used automatically in a future validation process whenever the client connects to the server. If the incoming host key does not match against the previously saved host key, the user may be prompted with the following message:

SFTP Authentication (2)

This message is to warn the client that the saved Host key does not match the incoming host key from the SFTP server. In the worst-case scenario, this message may imply that the server has been compromised or there is a man-in-the-middle attack. However, this is usually not the case. Some of the likely cause of this message may include:

  • The user may have mistakenly loaded the user public key into the SFTP host key field, mistaking the user public key is the same as the server host (public) key
  • The system administrator may have changed the host key, or he re-installed the server and used a new host key
  • The user is using the wrong host key

If the host key does not match, it is best to check back with your SFTP administrator for further assistance.

The option to review or change the “SFTP Host Key” option is at:

Modify > Expert > FTP > Advanced

settings page of the SyncBackPro profile.

Client Authentication

There are several methods to configure the authentication procedure on an SFTP server. The three authentication methods supported by SyncBackPro are:

  • username and password
  • a username with a user’s public/private key
  • a username with a user’s public/private key and password

Client Authentication using Password

This is the simplest form of authentication using the traditional username/password method. A client logs in to SFTP using Username/Password. No user private/public keys are required (although the client may still get prompted by the server to validate the host key). Note that some SFTP servers may be configured to disallow password authentication by default, which will result in the connection attempt to fail. The “username” and “password” can be configured under:

Modify > Expert > FTP

settings page of the SyncBackPro profile.

Client Authentication using Public/Private key

Public key authentication is a method where the SFTP client identifies itself to the server by using public/private key pairs. The client first generates a pair of public and private keys from his own computer using third party key generation tools like PuTTYgen, etc. Prior to connection, the user’s public key must first be uploaded and registered on the SFTP server. Then the client’s private key is loaded via the “SFTP Private Key” option of:

Modify > Expert > FTP

settings page of the SyncBackPro profile.

Before any client authentication takes place, the client may get prompted by the SFTP server to validate the host key when establishing connection with it. Once server validation is complete the client will encrypt a signature using the loaded private key and sends it to the server. The server then verifies this signature against the stored user public key. Once verification is successful, the SFTP will grant access to the connecting client.

Client Authentication using Public key/Private key and password

Do note that the password described in this section is not referring to the login password, but rather this is the password (or passphrase) for the private key. Public/Private key and password configuration is similar to steps described in the latter section, except that it includes the private key’s password.

When using public key authentication, you store the private key unprotected on your computer. As a result, if anybody gains access to this private key on your PC, they would be able to log in to your SFTP server using your account. One way to prevent this is to encrypt the private key with a password/passphrase. To use this key, the user must first decrypt it by entering the key’s password under the “SFTP Private Key Password” option, located at:

Modify > Expert > FTP

settings page of the SyncBackPro profile.

Without the password, the private key cannot be used by anybody else other than the original owner.

Secrets Manager

Introduced with SyncBackPro V11, a secrets manager can be used to retrieve your SFTP username, password and/or key instead of it being stored locally. A Secrets Manager (AWS Secrets Manager, Azure Key Vault, Google Cloud Secret Manager and HashiCorp Vault) is like a highly secure digital vault that helps you store and manage important secrets, such as passwords, encryption keys, and certificates. It's like having a special safe for your sensitive information in the cloud. A Secrets Manager ensures that your secrets are stored in a protected and encrypted environment, keeping them safe from unauthorized access. It also helps you control who has access to your secrets and allows you to easily retrieve and use them when needed. Just like a physical vault protects valuable items, it safeguards your digital secrets, providing peace of mind and making it easier to manage and secure your sensitive information in the cloud.

Conclusion

Besides providing encryption via a secure channel, SFTP provides a way to authenticate both the user and host. Hopefully, this article was helpful in understanding the basics of server validation and client authentication, as well as the configuration steps necessary to setup an SFTP connection.

I'm an expert in secure file transfer protocols, particularly SFTP (Secure File Transfer Protocol), and I possess in-depth knowledge of the concepts discussed in the article by Conrad Chung. My expertise in this area is grounded in hands-on experience, research, and a comprehensive understanding of secure file transfer mechanisms.

The article primarily focuses on the basics of SFTP and various authentication methods used to connect to an SFTP server. Let's break down the key concepts presented:

  1. SSH (Secure Shell) Protocol:

    • The SSH protocol is an encrypted network protocol discussed in the article, specifically employed for secure file transfer using SFTP.
    • Public key cryptography is used in SSH to create a more secure method for authenticating a client's identity and rights to access a server.
  2. Public and Private Key Pairs:

    • Two sets of public/private key pairs (four keys in total) are used in SSH:
      • User (Client) Public Key
      • User (Client) Private Key
      • Host (Server) Public Key (Host Key)
      • Host (Server) Private Key
  3. Host Key Validation:

    • Host key validation is a crucial aspect of SFTP to ensure the server's identity.
    • The client validates the SFTP server by checking its public key (host key).
    • A hash fingerprint of the host key is displayed to the client for verification.
  4. Client Authentication Methods:

    • Three client authentication methods are supported by SyncBackPro:
      • Username and password
      • Username with a user's public/private key
      • Username with a user's public/private key and password
  5. Client Authentication using Password:

    • The simplest form of authentication using a traditional username/password method.
    • Some SFTP servers may disallow password authentication by default.
  6. Client Authentication using Public/Private Key:

    • Public key authentication involves the use of key pairs for client identification.
    • The user's public key must be uploaded to the SFTP server, and the client's private key is loaded for authentication.
  7. Client Authentication using Public Key/Private Key and Password:

    • Similar to public/private key authentication but includes a password for the private key.
  8. Secrets Manager:

    • SyncBackPro V11 introduces a secrets manager for retrieving SFTP credentials securely.
    • AWS Secrets Manager, Azure Key Vault, Google Cloud Secret Manager, and HashiCorp Vault are mentioned as secure options.
  9. Conclusion:

    • SFTP not only provides secure file transfer but also authenticates both the user and the host.
    • The article emphasizes the importance of understanding server validation and client authentication, providing configuration steps for setting up an SFTP connection.

In summary, this article serves as a comprehensive guide for individuals seeking to understand the fundamentals of SFTP, its authentication methods, and the significance of server validation in ensuring secure file transfers.

SFTP Authentication (2024)

FAQs

What is the basic authentication for SFTP? ›

There are two methods of SFTP authentication: password authentication and SSH key authentication. Inbound SFTP connections to an Unqork Environment must use an Amazon Web Services SFTP Gateway and SSH key authentication. But the server you want to connect with might need password authentication too.

What causes SFTP to fail? ›

Mismatched Quotes or Brackets: The file contains mismatched quotation marks, brackets, or other delimiters, which can confuse the SFTP server's parsing mechanism and result in an "illegal quoting" error. File Corruption: The file may be corrupted or improperly formatted, leading to errors during the upload process.

Is SFTP secure enough? ›

Undoubtedly, SFTP does secure data transfer in transit, but because it is built on top of Secure Shell (SSH), it mandatorily requires the opening of port 22 in corporate firewalls.

What additional authentication method does SFTP use? ›

Public key authentication is a robust and widely used method in SFTP. It involves the use of a public-private key pair, where the client holds the private key and the server holds the public key. When the client attempts to authenticate using public key authentication, it sends its public key to the server.

How do I authenticate SFTP? ›

Authenticating an SFTP server with a password is simple. The administrator creates a username and password combination for a user. After the setup is complete, whenever the user signs in, the server checks the username/password combination and approves or denies the request based on whether the password is correct.

How do I verify SFTP? ›

SFTP Connection Validation
  1. Select Database on the top navigation bar.
  2. Select SFTP Connection Validation.
  3. Enter the connection settings associated with the SFTP account. You can also click Lookup Current IP Address if you don't know yours.
  4. Click Validate.

How do I know if my SFTP is successful? ›

Each SFTP file will go into either a success or failure folder. If the file is in the error folder, an error was found and the file didn't process. If you do not have access to the SFTP folder, consult the Continu Stakeholder within your company to find out who can access the folder.

What is the downside of SFTP? ›

The main downside of SFTP, as with FTP, is that it's complex and often difficult to use—especially for non-technical users or those unaccustomed to dated interfaces and command-line prompts—which can lead to painfully slow onboarding times and a near-constant need for technical support.

Why can't I connect to a SFTP server? ›

Make sure you use port 22 . Please make sure your username and password are the same as your host email username and password (unless you have changed your password). Your firewall could be blocking the connection. Make sure you have the server (host) from your host email for hostname (+ sftp:// extension first).

Does anyone still use SFTP? ›

SFTP, based on SSH, encrypts both data and commands in a single connection, simplifying firewall configurations by requiring only port 22. Three common protocols still used in file transfer today are FTP, FTPS, and SFTP.

What is better than SFTP? ›

SCP utilizes a more efficient transfer algorithm that doesn't have to wait for packet acknowledgment, unlike SFTP.

How to make SFTP secure? ›

What Can I Do to Make Sure My SFTP Server Is Secure?
  1. Disable FTP. ...
  2. Use the strongest encryption. ...
  3. Use file and folder security for external access. ...
  4. Use folder security for internal access. ...
  5. Include documentation and auditing. ...
  6. Use IP blacklisting and whitelisting.
Aug 20, 2022

What is the secret key in SFTP? ›

An SFTP key is part of a two-factor authentication process that enhances the security of SFTP protocols by adding a layer beyond just passwords. It involves a pair of keys: a private key held by the user and a public key stored on the server.

Does SFTP use TLS or SSL? ›

No, SFTP (Secure File Transfer Protocol) does not use TLS (Transport Layer Security). SFTP is actually an extension of the SSH (Secure Shell) protocol and, as such, it utilizes the security mechanisms provided by SSH, which include strong encryption, authentication, and data integrity.

What is the best encryption for SFTP? ›

Symmetric encryption is one of the most commonly used methods in SFTP. In symmetric encryption, the same key is used for both encryption and decryption. This method is preferred for its speed and efficiency.

What are the authentication mechanisms for SFTP? ›

SFTP Authentication Process

Authentication by the SFTP Server: For Public Key and Host Based authentication, the SFTP server authenticates the connection with the public key of the ALSB service. For Username Password authentication, the SFTP server authenticates the connection with the username and password.

What permissions are needed for SFTP? ›

SFTP File Permissions
  • • Owner permissions;
  • • Group permissions. ...
  • • ...
  • •Read - permission to read the file.
  • •Write - permission to write to the file.
  • •Execute - permission to execute the file.
  • •Switched on – this means that you want to set a permission.
  • •Switched off – this means that you want to remove a permission.

What is the default protocol for SFTP? ›

SFTP uses port number 22 by default, facilitating secure data movement over a single internet connection. This SFTP port assignment allows SFTP to offer enhanced security and simplicity compared to other protocols like FTP/S, which require multiple ports.

What are SFTP credentials? ›

SFTP is a secure protocol for file access, file transfer, and file management on a server, using either a Username and Password or SSH key for authentication. After you set up the integration, the credentials can be used in Workflow SFTP actions.

Top Articles
Academic Guides: Writing a Paper: How to Achieve Your Writing Goals
Roblox Gift Card Begins To Pop Up At 7-Eleven Malaysia - Lowyat.NET
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Pearson Correlation Coefficient
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Nfsd Web Portal
Selly Medaline
Latest Posts
Article information

Author: Kelle Weber

Last Updated:

Views: 5464

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Kelle Weber

Birthday: 2000-08-05

Address: 6796 Juan Square, Markfort, MN 58988

Phone: +8215934114615

Job: Hospitality Director

Hobby: tabletop games, Foreign language learning, Leather crafting, Horseback riding, Swimming, Knapping, Handball

Introduction: My name is Kelle Weber, I am a magnificent, enchanting, fair, joyous, light, determined, joyous person who loves writing and wants to share my knowledge and understanding with you.