File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes Issue SSH from Linux server to UNIX DB server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Issue SSH from Linux server to UNIX DB server" Watch "Issue SSH from Linux server to UNIX DB server" New topic
Author

Issue SSH from Linux server to UNIX DB server

Ragupathirajan Venkatesan
Ranch Hand

Joined: Aug 18, 2010
Posts: 62
Dear All,

I need to write shell script in linux server under any folder, that should issue SSH to another unix based DB server to execute some DB script. After all I need to cpoy those log trace(db execution) to my linux server under some folder. Could some one can help me on this.

Thanks in advance
Ragu
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15961
    
  19



This works best if you setup an SSH cert so that the command won't prompt for a password.

Note that I made the ssh invoke a server-side script. That's because you may have to issue multiple commands to get the job done. Also because it's easier to test if you can log in and run the script as a remote user instead of having to debug both the ssh connection and the commands at the same time.


Customer surveys are for companies who didn't pay proper attention to begin with.
Ragupathirajan Venkatesan
Ranch Hand

Joined: Aug 18, 2010
Posts: 62
Hi Tim,

Thanks a lot your for kind reply.

Regards,
Ragupathirajan V
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue SSH from Linux server to UNIX DB server
 
Similar Threads
connecting to Unix ssh server
Need unix shell script Help
sftp communication with private/public key authentication
Problem with Cygwin and Windows XP
Java program sshing to Linux Server