There's a problem with deplying with Jenkins The server where Jenkins is running is centos7 and the key is generated by keygen.
WORKSPACE="/var/lib/jenkins/workspace"
TOMCAT="/usr/local/apache-tomcat-8.5.54-board"
SVR="My IP Address"
ssh root@$SVR $TOMCAT/bin/shutdown.sh
ssh root@$SVR "rm -rf /root/src/board/*"
scp $WORKSPACE/build/build/libs/*.warroot@$SVR:/root/src/board/my files.war
sshroot@$SVR "cd /root/src/board; /usr/local/java/bin/jar -xvf My Files.war"
ssh root@$SVR $TOMCAT/bin/startup.sh
The following error occurred when building.
Host Key verification failed, but should I put the pub key that generated the key in Jenkins??
For reference, the key generation of centos was generated in /root/.ssh.
cat id_rsa.pub>> authorized_keys
I added the public key information
jenkins deploy
It's a self-answer;;;; It didn't work because I connected with root authority
© 2024 OneMinuteCode. All rights reserved.