Thank you, our adivisors will calling you.
Are SSH Keys or Passwords Better for SFTP Authentication?
SSH keys or passwords? What are the real differences between these methods? How do they work? Is one really better or more secure than the other?Read the news
par GoAnywhere MFT • 09 Sep 2020
SSH keys or passwords? That’s the question often asked by IT professionals when setting up authentication on an SFTP server. There’s some debate on whether SSH keys or passwords are better at protecting and validating company SFTP servers, and the consensus is never official. What are the real differences between these methods? How do they work? Is one really better or more secure than the other?
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.
To make this method secure, the admin can enable a failsafe: if someone incorrectly tries the password more than x amount of times in x minutes, they’ll be blocked from the account. The admin can also set passwords to meet certain requirements (i.e. a specific length or includes capitalized letters, numbers, and symbols) and expire after a certain number of days—though whether this practice really prevents data breaches is still up for debate.
Authenticating an SFTP server with a SSH key requires a little extra legwork, but it’s a useful option for extra security. An SSH key pair is comprised of a private key and public key portion. The key pair is automatically generated by the computer and can be up to 4096 bits in length, which is much longer than a typical password.
You have a private key that’s kept on the SSH client software and a public key that’s kept on the SSH server.
Once the public and private keys are stored, the client software can authenticate against the SSH server. Some SFTP servers require both an SSH key and password for additional authentication. Anyone who tries to login with the username or password (or both) but doesn’t have the correct private/public key match will be denied access to the server, regardless of whether they try to brute-force it.
Questioning what the best SFTP security best practice is doesn’t have an easy answer. Both SSH keys and passwords have their advantages and disadvantages; it depends on what your organization needs and how strong your cybersecurity policy is. Neither method is completely immune to compromise. There’s no one option that’s foolproof.
However, if you’re not sure which one to use, we recommend using SSH keys and a password to authenticate your users against an SFTP server.