• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

programmatic way for SSH

 
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
We use Putty(SSH) to connect to one intermediate UNIX server.From this server we use Telnet to connect to production UNIX server to see the logs.Is there any better programmatic way to pass these credentials ? Basically checking the logs in browser is better than seeing unformatted logs on black UNIX screen!!
 
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yea, a simple servlet to do a tail operation on a log file, such that refreshing the page would re-run the tail.
but that would mean deploying a servlet container, or other script engine, on the machine where the logs are, and woud require the URL to this log viewer probably be secure, and assume the machine with the logs is even on the network in a way that http requests on some off beaten path port to view logs on is possible. and another problem if the log file (e.g. apache) is used for the application and this log viewer applet, then requests to view the logs will show up in the logs (what I call the 'fridge light problem').

but basically , in theory a general fie tailer might look like


and this could even be invoked from a JSP page, or a servlet


it would be really cool to extend this into an ajax driven auto refresh mechanism.
 
Arjun Shastry
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help.
 
Arjun Shastry
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any API to pass SSH/Telnet parameters programmatically?So that servlet can connect to production server?
In Putty, i don't see any java api.
 
Travis Hein
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here are a couple projects I know of that might help for this.

for ssh, the "jsch" project
http://sourceforge.net/projects/jsch/

and for telnet the commons-net project
http://commons.apache.org/net/
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic