Replies: 1 comment
-
If you background the process (the last |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have a question. I use SSHJ execute the command "nohup Java jar - server - Xms1g - Xmx1g - XX: XX: + UseG1GC - + UnlockExperimentalVMOptions - XX: G1NewSizePercent = 20 -XX:G1MaxNewSizePercent=30 -XX:+DisableExplicitGC /data/deploy/jar/nut-helloworld.jar --spring.profiles.active=dev >> /data/deploy/jar/nut-helloworld.log 2> &1&", returns a status code of 0, but it does not take effect. The same command that I wrote in the script worked when the script was executed
The code is as follows:
public static SSHClient connect(String host, Integer port, String user, String password) throws IOException {
SSHClient ssh = new SSHClient();
ssh.addHostKeyVerifier(new PromiscuousVerifier());
ssh.connect(host,port);
ssh.authPassword(user, password);
return ssh;
}
Beta Was this translation helpful? Give feedback.
All reactions