I'm currently developing a small bot in Java that I run from Raspberry Pi's. These Raspberry Pi's are connected to DSL-routers in some shops that a friend of mine run. The purpose is to monitor different things in his shops, like uptime, client uptime etc., using nmap for one.
I've implemented the IRC client using PircBot.
Furthermore, I've used Jsch as my SSH client. I've followed one of the example SSH clients to get the shell output in the Java console.
Now, what I want to do is, to output this in JircBot's sendMessage()
method instead. My Jsch client uses channel.setOutPutStream(System.out)
as of now.
How do I get Jsch to output via JircBot's sendMessage()
instead?
PS: The SSH client connects locally, there might even be smarter ways to execute commands on the Raspberry Pi, instead of using SSH locally, and output the shell via PircBot?
Kind regards