Starting a process on Linux remotely from a Windows computer

I would like to be able to run a process that exists on a Linux machine remotely from a JAVA application running on a Windows machine. What is the best way to do this? Or an online resource that can help me? Many thanks.

+3
source share
5 answers

You can use any of many Java SSH client libraries, such as javassh , as long as the Linux machine starts sshd (and the firewalls are configured to allow ssh traffic), which is likely to happen. There are many possible ways to configure SSH authentication, basically boiling up to sending a password (securely) on the network or using public / private key pairs (RSA or DSA) - the latter is usually preferable, but you will need to familiarize yourself with the system and network administrators about this problem ... this is not a software development problem, but rather a system administration and security one.

+5
source

In short, use the ssh client.

1: openssh Cygwin.

2: Putty.

( ) .

+1
  • - [fire and forget] Linux.
  • Windows.
0

- . Java- Java (~ webservice), . , , . ? ? , , Java?

0

ssh ..

     String[] cm = {
                   "ssh",
                   "username@hostIP" ,
                   "your command"

                   };

     try
      {
       Process q=  Runtime.getRuntime().exec(cm);
       q.waitFor();
      }
    catch(Exception e) {}
0

Source: https://habr.com/ru/post/1718732/


All Articles