I want to execute command (for example pwd) on a server through a Jump host. I know Publish Over Ssh, but I'm not gonna use it. In a simple way, I want to run these commands in a Jenkins pipeline:
eval $(ssh-agent -s)
ssh-add $SSH_PK_SECRET
ssh -o StrictHostKeyChecking=no -A -J user@JumphostServer user@Server_ip_address pwd
Note: with "SSH_PK_SECRET" is already authorized in both servers.