Software⏱️ 3 min read📅 2026-06-15

How to Fix: Why am I getting a bad signature for RSA key error with Rysnc crontab between Linux and macOS?

Error fixing RSA key signature issue with Rsync crontab between Linux and macOS.

Quick Answer: Check the OpenSSL version on both systems, as LibreSSL 3.3.6 may not be compatible with OpenSSH_8.7p1.

The error 'client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0: error in libcrypto' occurs when there is a discrepancy between the RSA key used on the client and server sides, preventing the SSH connection from establishing. This issue affects users trying to use Rsync with crontabs between Linux and macOS.

This problem can be frustrating, especially when using automated scripts like crontabs. However, by following the steps outlined below, you should be able to resolve the issue and get your Rsync backups working properly.

💡 Why You Are Getting This Error

  • The primary reason for this error is a mismatch between the RSA key used on the client and server sides. This can happen when the same key is copied across different systems or if there are differences in the key formatting.
  • An alternative reason could be an issue with the SSH configuration or the known hosts file on either the client or server side.

🚀 How to Resolve This Issue

Uploading and Configuring RSA Keys

  1. Step 1: Copy the public key from the Linux machine to the macOS machine using ssh-keygen -y -f ~/.ssh/id_rsa > /Users/user3/.ssh/id_rsa
  2. Step 2: Upload the copied public key to the target machine by appending it to the authorized_keys file: cat ~/.ssh/id_rsa >> /Users/user3/.ssh/authorized_keys
  3. Step 3: Verify that the key has been uploaded and is recognized by the server using ssh user3@myworkstation.local 'cat /Users/user3/.ssh/authorized_keys'

Configuring SSH to Ignore Host Key Verification

  1. Step 1: Edit the ssh configuration file on the client machine: nano ~/.ssh/config
  2. Step 2: Add the following line to the config file: Host myworkstation.local UserKnownHostsFile=/dev/null PubkeyFile=/Users/user3/.ssh/id_rsa
  3. Step 3: Save and close the config file, then restart the SSH service: sudo systemctl restart sshd

✨ Wrapping Up

To resolve the issue with the 'client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0: error in libcrypto' error, you can try uploading and configuring the RSA keys on both machines. Alternatively, you can configure SSH to ignore host key verification by adding a known_hosts file and pubkey file configuration. By following these steps, you should be able to establish a successful SSH connection and resolve the issue with your Rsync backups.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions