-1

My main goal: Collect specific information through the linux server on a windows machine. I want this program to ask the user for information needed and the program will log into the linux server with credentials "hard-coded" in the software and obtain the appropriate specific information the user requested.

My situation: This program will be used with different OSs (Mac, Windows, Linux, etc.). I have written a Perl script that does the task I want, but to run the script, you have to be on the linux server, but I want the user to not have to log into the linux server. I do have PuTTy on my computer which is what I use to log into the linux server. I don't know if that will be useful.

My program steps:

1) Once the user opens the program, a GUI will display different elements that the user interacts with. These elements ask for information that will aid in obtaining the specific information through the linux server.

2) Connect to the linux server. This is the tricky part. If I'm coding in Java, for example, making a normal application with Swing and I'm running on a windows machine, how can I connect straight to a linux server, enter commands, and obtain output information and send it to a text file?

3) Take the information that would have been outputed to the terminal screen and send it to a text file on the linux server and/or locally.

4) Finishing touches.....(closing the terminal, telling the user success or fail, etc.).

Like I said above, I have written a Perl script that you can run and will obtain all the information and send the output to a text file and do every thing I want it to do, but I want this to be more interactive and "user-friendly" and not have to make the user log into the linux server, but simply just open a program and click a few buttons. The program will log into (This login info would be the same username and password every time) to linux server, send the required information to a text file, and do everything for them.

Thanks in advance!!

Rob Avery IV
  • 3,562
  • 10
  • 48
  • 72

1 Answers1

1

Plink program from Putty site should be able to do what you want. See http://the.earth.li/~sgtatham/putty/0.62/htmldoc/Chapter7.html#plink Problem would be with SSH fingerprint, that has to be confirmed first time from putty itself, not from plink.

Pihhan
  • 813
  • 5
  • 11