| Author |
Capture/Display logs from Unix box - Access from Java
|
Natraj Aggas
Greenhorn
Joined: Jul 11, 2011
Posts: 15
|
|
Hi,
I have to write a java program in which i need to connect to a unix server and need to display the logs from unix server to my local console. Could anyone help me if you have similar kind of code.
Thanks,
-N
|
 |
Ivan Jozsef Balazs
Ranch Hand
Joined: May 22, 2012
Posts: 380
|
|
The first question is how do you want to connect to the server: through which protocol.
telnet? ssh? ftp? sftp? scp? etc?
|
 |
Natraj Aggas
Greenhorn
Joined: Jul 11, 2011
Posts: 15
|
|
Hi, I am planning to connect thro telnet. The java should kick an unix script located in some location.
Ex: Remote ip - 100.12.122.xxxx, hostname - xyz.
The script named getLogs.sh is located in /home/natraj/scripts/
I am new to this telnet concepts, so can you help me how the java code will be for the above scenario.
|
 |
Ivan Jozsef Balazs
Ranch Hand
Joined: May 22, 2012
Posts: 380
|
|
So you seem to need a telnet library for Java.
http://commons.apache.org/net/
|
 |
 |
|
|
subject: Capture/Display logs from Unix box - Access from Java
|
|
|