-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSsh.java
40 lines (40 loc) · 2.06 KB
/
Ssh.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//DONE
import java.io.*;
public class Ssh {
public static void main(String[] args) {
String username = "brookescoglio"; //Login UserID
String projPath = "/cise/homes/brookescoglio/CNT/project"; // path of the project
// is
String pubKey = "rsakey"; // location of key
try {
Runtime.getRuntime().exec("ssh -i " + pubKey + " " + username +
"@lin114-00.cise.ufl.edu cd " + projPath
+ " ; java PeerProcess 1001 ");
Runtime.getRuntime().exec("ssh -i " + pubKey + " " + username +
"@lin114-01.cise.ufl.edu cd " + projPath
+ " ; java PeerProcess 1002 ");
Runtime.getRuntime().exec("ssh -i " + pubKey + " " + username +
"@lin114-02.cise.ufl.edu cd " + projPath
+ " ; java PeerProcess 1003 ");
Runtime.getRuntime().exec("ssh -i " + pubKey + " " + username +
"@lin114-03.cise.ufl.edu cd " + projPath
+ " ; java PeerProcess 1004 ");
Runtime.getRuntime().exec("ssh -i " + pubKey + " " + username +
"@lin114-04.cise.ufl.edu cd " + projPath
+ " ; java PeerProcess 1005 ");
Runtime.getRuntime().exec("ssh -i " + pubKey + " " + username +
"@lin114-05.cise.ufl.edu cd " + projPath
+ " ; java PeerProcess 1006 ");
Runtime.getRuntime().exec("ssh -i " + pubKey + " " + username +
"@lin114-06.cise.ufl.edu cd " + projPath
+ " ; java PeerProcess 1007 ");
Runtime.getRuntime().exec("ssh -i " + pubKey + " " + username +
"@lin114-08.cise.ufl.edu cd " + projPath
+ " ; java PeerProcess 1008 ");
Runtime.getRuntime().exec("ssh -i " + pubKey + " " + username +
"@lin114-07.cise.ufl.edu cd " + projPath
+ " ; java PeerProcess 1009 ");
} catch (Exception e) {
}
}
}