
다음 명령을 사용하여 jenkins 서버에서 ec2 서버로 쉘을 실행하여 jar 파일을 실행하려고 합니다.
ssh -i [mykey] [username]@[Ip address of the host] java -jar [jarname].jar'
하지만 계속 오류 메시지가 나타납니다.
"오류: jar 파일 Mycode.jar에 액세스할 수 없습니다."
컴퓨터에서 직접 실행하려고 하면 java -jar Mycode.jar
제대로 작동하지만, 원격으로 실행하면 작동하지 않습니다. 어떤 아이디어?