I am trying to use AWS Secret manager to store a private ssh key and read in bash script. I created the secret with name testsshkey in Secrets manager. This is a multiline text stored in SecretsMananger Then I created the bash script with following
secret_key=$(aws secretsmanager get-secret-value --region us-east-1 --secret-id testsshkey --query SecretString --output text)
echo $secret_key
When I run this script, it only prints last line of the key