All Questions
37 questions
0
votes
1
answer
88
views
sshj: How to pipe input to automated host-side script
So, here's the situation:
I would like to use the sshj library to connect to a host which automatically runs a script on connection. Let's say the script merely logs whatever json formated input it ...
0
votes
1
answer
189
views
Error: Could not find or load main class org.testng.TestNG when running via SSH
I have a project that I run using the following command:java -cp ".\target\classes;lib\*;" org.testng.TestNG ParallelTestXML.xml and it runs just as it should. I uploaded this project via ...
0
votes
1
answer
269
views
Spring Boot app fails to start up using SSH
I have a spring app that is happily running on a staging and a prod server. It's time to automate deployments.
I have a restart.sh script on my staging server. if I ssh into the server and run it as ...
2
votes
2
answers
1k
views
Run jar on remote machine as background process over ssh
I want to run a jar as a background process on a remote machine over ssh connection. There is bash script on remote machine to execute jar
#!/bin/sh
export JAVA_HOME=/location/of/java/
export PATH=$...
5
votes
1
answer
342
views
Executing bash script via java in background after ssh connection is closed
I am using java to execute a simple bash script on a remote linux machine.
The bash script named "shortoracle.bash" have this script:
#!/bin/sh
runsql() {
i="$1"
end=$((SECONDS+360))
...
-1
votes
2
answers
371
views
Run bash file on remote linux machine with java and keep it in background
I have a shell script on a remote linux machine which contains the following:
#!/bin/sh
for i in $(seq 1 10);
do
echo "CREATE TABLE ben$i (id NUMBER NOT NULL);
! sleep 30
select * from ben$i;...
3
votes
1
answer
71
views
Run many java applications via ssh in a bash script
I'm trying to optimize some experiments with a Java application. The same application is on many machines. I want to run all of them via a bash script with ssh.
I have a bash script that has a while ...
0
votes
1
answer
487
views
Rundeck [ssh-exec] can't find bash
My organization is using Rundeck to execute simple batch jobs throughout their system. We originally configured it to run on a Linux VM such that it would execute jobs on Linux, Solaris and Windows ...
4
votes
1
answer
1k
views
starting remote (SSH) Java application with shell script will not return local prompt
I've seen similar questions, all addressed issues were already solved/not applicable.
I have a bash script in the remote machine that starts a Java application. The relevant lines would be:
#!/usr/...
1
vote
0
answers
460
views
Command passed via SSH from Java gets cut ater 900 characters in Windows
I joined a project which utilizes Java to execute SSH commands, I'm trying to run a test suite on localhost. Short commands are executed properly. Running longer commands is a challenge, though. An ...
1
vote
1
answer
2k
views
Executing multiple bash commands using a Java JSch program after sudo login
I am trying to execute multiple bash commands through a Java program which connects to a SSH using JSch. But after sudo login, I am unable to execute any bash commands. From what I have read, after ...
0
votes
1
answer
624
views
Launching jar file on Azure virtual machine
I am developing a java server-like application (though it is not a server itself, more like a bot for social network) and I decided to use Azure virtual machine to deploy the app on. So I've chosen ...
1
vote
2
answers
4k
views
Execute a local script on a remote machine through Java JSch library
I am working on monitoring the logs for an error on a set of remote servers. For that I am monitoring logs that were modified within some time period.
I am using Jsch Java library to make a SSH ...
0
votes
1
answer
2k
views
Bash script executing jar file returns Unable to access jarfile app.jar in ssh
I have bash script run.sh which executes jar file:
#!/bin/bash
APPNAME=app
JARFILE=app.jar
JAVA_OPTS="-DTitle=$APPNAME -Xmx256m"
ARGS=test
echo "Starting $APPNAME with $ARGS..."
java $JAVA_OPTS -...
1
vote
1
answer
391
views
Use JAR Files In Bash
I've been looking for an answer, but still a little confused...
In eclipse I just configure the build path of the project and add the jar files that I need, and everything works just fine. When I try ...