Results 1 to 4 of 4
Thread: Java + SH
- 06-01-2010, 10:23 PM #1
Java + SH
I need a way to securely communicate password from my jar to a ksh script so that it can later refer to it as $1
Passing it as a parameter is no good, as simple ps -wef | grep proc will show the password in clear text
I was thinking about creating a random String, and exporting it as {randomString}={realpassword} format, where {randomString} is passed to the SH script, but it seems Java's setProperty method is limited to JVM and does not extend to the outside world.
Can you make a suggestion on how to best approach this?
The task is not to write a program for Nasa, but to make sure that it at least fool proof and simple things like ps won't catch password shown in clear text
Thanks
- 06-01-2010, 10:58 PM #2
Yes, you could write a simple encrypt method in Java and pass it to a script that is capable of decrypting it. How secure do you want it? If the script can be read by a programmer, it could be cut and pasted to output the password in the clear.
Sorry I really have no idea what a ksh script is.
- 06-02-2010, 01:11 AM #3
Senior Member
- Join Date
- Mar 2010
- Posts
- 953
- Rep Power
- 4
There's really no way to do this securely. Can you take a step back and give us a look at the bigger picture? What is it you're trying to do?
-Gary-
- 06-02-2010, 01:14 AM #4
Senior Member
- Join Date
- Mar 2010
- Posts
- 953
- Rep Power
- 4


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks