I have sh script in jenkins which has sudo ssh command and I am getting this error
Warning: Identity file key.pem not accessible: Permission denied. Host key
username ALL= NOPASSWD: ALL in sudoers worked in ubuntu server 12.04.2
sudo su visudo -f /etc/sudoers
add add following line at the end.
jenkins ALL= NOPASSWD: ALL