Resolving hanging SSH when using sshpass with a private key that has a passphrase
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
Users may experience SSH hanging when using sshpass in combination with a private key that has a passphrase, for example:
sshpass -p password ssh $user@server -v
debug1: Trying private key: /opt/atlassian/pipelines/agent/ssh/id_rsa
Solution
Include the -P assphrase
flag in the sshpass
command. Here's an example of how to use the command:
sshpass -p password -P assphrase ssh $user@server -v
Adding the -P assphrase
flag, you can prevent SSH from hanging and ensure a successful connection using the private key with a passphrase.
Last modified on Feb 21, 2025
Powered by Confluence and Scroll Viewport.