After googling around, I stumbled upon this: https://answers.atlassian.com/questions/13413922
Which led me to experiment for the past several hours with decent success. However, I seem to have run into a snag.
The story so far:
I have a build in bamboo that needs to scp a file from a remote server to the Amazon EC2 instance that bamboo is running on.
I can ssh into the EC2 isntance as root and, using an ssh key, successfully scp the desired file from the remote server to the EC2 instance.
I can ssh into the EC2 as the ec2-user provided by bamboo and, after appending "sudo" am again successful.
However, when I paste this command into a script task in bamboo, it fails.
If I leave off the "sudo" I get: "Host key verification failed.".
If I append the "sudo" I get: "sudo: no tty present and no askpass program specified".
By all accounts this should be working, so there must be something different about the user/permissions/something to do with bamboo running the command as opposed to myself, but I simply don't know what and I can't find any documentation that states this difference.
Any insight would be greatly appreciated.
Thank you.