• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble with runtime again..help!  RSS feed

 
Dave Jones
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
After many problems, I decided to use the Runtime class for writing a command
(scp) through the console, problem is, that it returns an error:
ssh_askpass: exec(/usr/lib/misc/ssh-askpass): No such file or directory
Permission denied, please try again.

( because it tries to get the password and I don't get the chance to give it, I think.)
this is the code sample:

the error jumps already in the first runtime.exec.
Is there a way to write the command line+the password in one command line ??
and if not, how do I fix this code???
Thank you, I've been fighting this for to long, please help.
[ March 15, 2005: Message edited by: Dave Jones ]
 
Arto Pastinen
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Can't you run java with sufficient rights? Make a shell script to run JVM, and assign sufficient rights for script.

It is not a good habit to write password to command argument's, because then you can see it with tool like top.

- Artsi
 
Dave Jones
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, the script option doesn't work either....
But I think I solved it if anyone wants the answer I'll recheck it and if it works I'll post the solution
 
Manish Malik
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what was the problem?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!