LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-18-2004, 12:07 AM   #1
nedian123
Member
 
Registered: Jun 2004
Location: PAKISTAN
Posts: 46

Rep: Reputation: 15
Question Error while trying to run exec method with rsh as arguement


hi,
Actually i m trying to run remote shell thru java's Runtime class method exec,

Runtime t=Runtime.getRuntime();
InputStream is = t.exec("rsh 192.168.0.20").getInputStream();

If i execute any other command of linux innthis method it is easily executed i.e. result is displayed in the terminal in which it is compiled & run.
But executing rsh does'nt display anything at the terminal.

whereas if i try using ssh 192.168.0.20 as a string in the exec method above it gives the option of entering password but after entrance of password the terminal goes on thinking and does'nt log on to the remote machine.

Leave all this if i execute rsh 192.168.0.20 or ssh on the terminal it is executing perfectly after providing the password.

Kindly help me out as soon as possible....its really important.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rsh error: protocol failure in circuit setup Andrea Linux - Networking 5 09-17-2009 01:15 PM
RSH: remuser too long error when rsh is executed from IIS dev33445 Programming 0 08-29-2005 09:34 AM
MDK 9.1 Fatal Error in Stage 1: Exec Format Error Beano Mandriva 5 09-12-2004 03:04 PM
rsh script to run on cluster podollb Linux - Networking 3 03-10-2004 10:22 AM
cfgmgr errors out method error trew AIX 1 01-29-2004 12:22 PM


All times are GMT -5. The time now is 10:49 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration