SFTP Private Key Authentication

BC3 logo BC version 3 or 4

Pro only Pro Edition only

Beyond Compare 3 or 4 Pro allow you to authenticate an SFTP connection using a private key file instead of a password.

Generate Private Key on Linux Server

  1. ssh-keygen -t rsa
  2. Enter to save key as ~/.ssh/id_rsa
  3. Enter a passphrase if desired.
  4. chmod 700 ~/.ssh
  5. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
  6. chmod 600 ~/.ssh/authorized_keys

See the article Redhat Enterprise Linux 6 Deployment Guide - Generating Key Pairs for a more detailed guide to generating private keys.

Configure Beyond Compare 4 Pro to Use the Private Key

  1. Copy private key ~/.ssh/id_rsa to a folder on the local PC.
  2. On Windows or Linux, open Tools | Profiles.  On Mac OS X open Beyond Compare | Profiles.
  3. Click + to create a new profile.
  4. Select FTP Profile.
  5. Go to the Login tab.
  6. Select SFTP (SSH2) as the protocol.
  7. Enter Host and Username.
  8. Leave Password blank and uncheck Save Password.
  9. In the SSH private key file field, click the browse button and select the private key copied from the Linux server (id_rsa).
  10. Save the profile.
  11. In the Folder Compare, click the browse button.
  12. Select the saved profile of your SFTP server and click OK.
  13. Enter a passphrase for the private key if required.

Configure Beyond Compare 3 Pro to Use the Private Key

  1. Copy private key ~/.ssh/id_rsa to a folder on the local PC.
  2. Open Tools | FTP Profiles.
  3. Click New to create a new profile.
  4. Go to the General tab.
  5. Select SFTP (SSH2) as the protocol.
  6. Enter Host and Username.
  7. Leave Password blank and check Save Password.
  8. Go to the Authentication tab.
  9. In the SSH public key authentication: Private key file field, click the browse button and select the private key copied from the Linux server (id_rsa).
  10. Enter a passphrase for the private key if required.
  11. Save the profile.
  12. In the Folder Compare, click the browse button.
  13. Go to the FTP Site tab.
  14. Click the Profile dropdown, select the profile of your SFTP server and click OK.

Copyright © 2017 Scooter Software, Inc.