pipeline { agent any environment { SERVER_IP = '192.168.1.82' // Replace with your server IP/hostname SERVER_USER = 'aimo' // Replace with your server username } stages { stage('Test SSH Connection') { steps { sshagent(['backend-server-digitaltwin']) { // Use the credential ID you created sh ''' # Print SSH key info ssh-add -l # Try verbose SSH connection ssh -v -o StrictHostKeyChecking=no aimo@192.168.1.82 'echo test' ''' } } } } post { success { echo 'SSH Connection test completed successfully!' } failure { echo 'SSH Connection test failed!' } } }