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

test ssh

parent 7e2151bc
...@@ -10,6 +10,7 @@ pipeline { ...@@ -10,6 +10,7 @@ pipeline {
NEXUS_REPOSITORY = "maven-nexus-repo-jenkins" NEXUS_REPOSITORY = "maven-nexus-repo-jenkins"
NEXUS_CREDENTIAL_ID = "nexus-jenkins" NEXUS_CREDENTIAL_ID = "nexus-jenkins"
REMOTE_AGENT = "35.192.10.103" REMOTE_AGENT = "35.192.10.103"
USER = "azuredevops644"
} }
stages { stages {
stage('Git Checkout') { stage('Git Checkout') {
...@@ -60,9 +61,7 @@ pipeline { ...@@ -60,9 +61,7 @@ pipeline {
steps{ steps{
sshagent(credentials: ['ssh-cred']){ sshagent(credentials: ['ssh-cred']){
sh ''' sh '''
sudo [ -d ~/.ssh ] || mkdir ~/.ssh && chmod 0700 ~/.ssh ssh ${USER}@${REMOTE_AGENT} "echo hell"
sudo ssh-keyscan -t rsa,dsa ${REMOTE_AGENT} >> ~/.ssh/known_hosts
sudo ssh root@${REMOTE_AGENT} echo "hello"
''' '''
} }
} }
......
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