So I am writing a program in java that launches PuTTY from the command line and then I need to be able to switch over to the PuTTY command line once it opens instead of my windows command line. How do I make that switch so I can continues to enter commands in PuTTY?
Asked
Active
Viewed 1,689 times
0
-
http://stackoverflow.com/questions/603187/how-to-send-commands-to-putty – Ali Jan 30 '17 at 18:29
-
3Possible duplicate of [How to send commands to putty](http://stackoverflow.com/questions/603187/how-to-send-commands-to-putty) – Nir Alfasi Jan 30 '17 at 18:29
1 Answers
0
Basically you have to look into the ProcessBuilder.
The easy part is to use that to start putty. And when you are lucky, you can connect (pipe) the input/output streams into/from that process.
In other words: you will have to wire the parent process; and the child process using those streams; and then you might be able to read all output created by putty and write stuff there.
But that would require that putty prints the "connection" output into its stdout stream; something I very much doubt.

GhostCat
- 137,827
- 25
- 176
- 248