我正在 Jenkins 上尝试以下操作:
steps {
script{
sshagent (credentials: ['creds']) {
sh '''
ssh -o StrictHostKeyChecking=no -tt jenkins@${IP} "
cd
"
'''
}
}
}
显然我只是想获取当前目录。作为输出,我得到:[2JConnection to IP closed
有人见过这个吗?