I set up a bamboo box and am working on a deployment task. If I try to run any sudo command from the SSH task, I get the following error: "sudo: no tty present and no askpass program specified Sorry, try again."
I have read through some fixes:
- Remove the following line in sudoers file: Defaults requiretty
- sudoers file on server does not have this.
- Run ssh with -t command
- Do not know how to achieve this in bamboo.
- Use RSA tokens to connect bamboo server with remote server.
- Got the token (user ssh-keygen -t rsa), however, I get the following error:
- There is something wrong with your private key: java.io.IOException: Could not read key pair from: [PrivateKeyStringResource]
Anybody know how I can acomplish any of those tasks. I need to be able to run some sudo commands on remote server.
Thanks.