[user@prh01967.prod /home/user]$ cat startFlagsAgent.sh JAVA_HOME=/opt/java/hotspot/7/current/jre PATH=$JAVA_HOME/bin:$PATH nohup $JAVA_HOME/bin/java -jar ~/FlagsAgent-0.0.1-SNAPSHOT.jar -https > ~/agent.log & pId=$! echo "kill $pId" > ~/stop_agent.sh chmod u+x ~/stop_agent.sh 217 ssh userprh01628.prod 'bash -s' < ./startFlagsAgent.sh