I want to connect from Jenkins agent to remote server via SSH and execute the commands. Exactly like said here:
sshagent (credentials: ['deploy-dev']) {
sh 'ssh -o StrictHostKeyChecking=no -l cloudbees 192.168.1.106 uname -a'
}
But in example I see that they mention credentials from Jenkins and in the command again uses login: "-l cloudbees".
So my question is the following: what "credentials: ['deploy-dev']" is used for then?