If the key.pub file requires a passphrase, the connection attempt can fail with this error:
PHP Warning: ssh2_auth_pubkey_file(): Authentication failed for <username>
using public key: Callback returned error in <path_to_script>
line <line_number>This is still an open bug with PHP. To work around this on Cloud Platform, create a public/private key pair without a passphrase. Then, add it to your Acquia profile (glossary term, activate to view definition) using the Cloud Platform interface. You can then use the key, using ssh2_auth_pubkey_file() (as in the preceding example) without the optional passphrase parameter.
If you get a 'server refused our Key' error when trying to connect through SSH, ensure that the correct ports are open on your network and verify your SSH key type. You must use an RSA key type for SSH connections. For connection-related issues, confirm that your firewall settings permit port 22 connections and that your SSH configuration permissions are correct. You might also consider contacting your IT team (glossary term, activate to view definition) to ensure that your SSH keys are properly deployed and linked to the correct applications.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
If the key.pub file requires a passphrase, the connection attempt can fail with this error:
PHP Warning: ssh2_auth_pubkey_file(): Authentication failed for <username>
using public key: Callback returned error in <path_to_script>
line <line_number>This is still an open bug with PHP. To work around this on Cloud Platform, create a public/private key pair without a passphrase. Then, add it to your Acquia profile (glossary term, activate to view definition) using the Cloud Platform interface. You can then use the key, using ssh2_auth_pubkey_file() (as in the preceding example) without the optional passphrase parameter.
If you get a 'server refused our Key' error when trying to connect through SSH, ensure that the correct ports are open on your network and verify your SSH key type. You must use an RSA key type for SSH connections. For connection-related issues, confirm that your firewall settings permit port 22 connections and that your SSH configuration permissions are correct. You might also consider contacting your IT team (glossary term, activate to view definition) to ensure that your SSH keys are properly deployed and linked to the correct applications.
If this content did not answer your questions, try searching or contacting our support team for further assistance.