Commit 2c18179f authored by Josh Steinberg's avatar Josh Steinberg

test ssh

parent 7e2151bc
......@@ -10,6 +10,7 @@ pipeline {
NEXUS_REPOSITORY = "maven-nexus-repo-jenkins"
NEXUS_CREDENTIAL_ID = "nexus-jenkins"
REMOTE_AGENT = "35.192.10.103"
USER = "azuredevops644"
}
stages {
stage('Git Checkout') {
......@@ -60,9 +61,7 @@ pipeline {
steps{
sshagent(credentials: ['ssh-cred']){
sh '''
sudo [ -d ~/.ssh ] || mkdir ~/.ssh && chmod 0700 ~/.ssh
sudo ssh-keyscan -t rsa,dsa ${REMOTE_AGENT} >> ~/.ssh/known_hosts
sudo ssh root@${REMOTE_AGENT} echo "hello"
ssh ${USER}@${REMOTE_AGENT} "echo hell"
'''
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment