Win a copy of Terraform in Action this week in the Cloud forum!
  • 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 Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Trouble with runtime again..help!

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So what was the problem?
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic