• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connecting to Unix Remote server using SSH

 
Amar Naik
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

i have an requirement where i need to connect to the Remote server (Unx box) using SSH. Once i have logged in i need to go to the specific directory and execute a script.

I have difficulty in how to connect to Remote Host using SSh thorugh java. Basically i need the system command to do it..CAnu please help me in this thing ..

Thank You
Amar
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found several references to Java libraries that support SSH and SSH2 by means of a Google search. For example:
http://www.ganymed.ethz.ch/ssh2/
Bill
 
Van Glass
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the following article:

http://www.jscape.com/articles/ssh_using_java.html

In particular you may wish to look at the Ssh/SshScript and SshSession classes found in SSH Factory which allow you to write scripted ssh sessions.

http://www.jscape.com/sshfactory/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic