Hide Clipart | Topics | Search
Log Out | Register | Edit Profile
Last 30 mins | 1 | 2

Calling Java experts (core)

Chalanachithram.com DB » New TF Industry Related » Archive through February 25, 2015 » Calling Java experts (core) « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Humpty_dumpty
Moderator
Username: Humpty_dumpty

Post Number: 29876
Registered: 02-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 09:13 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Use scp with keys ke convince cheyyi
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Legend
Username: Maverick

Post Number: 55874
Registered: 01-2008
Posted From: 98.222.238.98

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 09:10 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Saint:


sudo wil not ask for pass..i didnt get the vulnerability piece..see if sudo works..we can tlak abt vulnerability
Happy Vizag
Top of pagePrevious messageNext messageBottom of page Link to this message

Saint
Legend
Username: Saint

Post Number: 45078
Registered: 01-2011
Posted From: 174.71.55.38

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 09:10 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Humpty_dumpty:

Saintesh
Scp must ayithay why not use ssh keys and get rid of password
Call shell script from Java
Pass filename server etc as args
Use process builder In Java to call shell script
I am not fan of this method
Replaced this with jsch



naako rankumogudu tagiladu...he wnated only in this specific way...

jsch/with public/private keys already cheppa...working code kooda vundi...he said nahin...
Top of pagePrevious messageNext messageBottom of page Link to this message

Machomegastar
Side Hero
Username: Machomegastar

Post Number: 9863
Registered: 02-2008
Posted From: 98.109.136.34

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 09:08 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Saint:


use base64 encoding for password
"illemo dhooram(ye illu!!) dharantha gathukulu asale cheekati chetilo deepam ledu kaani naa dhairyam ee kavacham." Na dhairyame na ayudam"

--NERA JAANA SENA
Top of pagePrevious messageNext messageBottom of page Link to this message

Humpty_dumpty
Moderator
Username: Humpty_dumpty

Post Number: 29875
Registered: 02-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 09:07 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Saintesh
Scp must ayithay why not use ssh keys and get rid of password
Call shell script from Java
Pass filename server etc as args
Use process builder In Java to call shell script
I am not fan of this method
Replaced this with jsch
Top of pagePrevious messageNext messageBottom of page Link to this message

Saint
Legend
Username: Saint

Post Number: 45077
Registered: 01-2011
Posted From: 174.71.55.38

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 09:07 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:


Touch test.txt. Put this in a shell script. Say test.sh..chmod 777 test.sh..
In your java exec sudo /path/test.sh




mav ...exec cheyyatam problem kaadu.....scp will prompt for the password and I dont have a machanism to input the password from the java program.

we dont want to store the password in a file or anywhere. but yes I think, we can still do it with cmd line arguments...but shell script execute cheyyatam ante, u are creating a vulnerability. full path ivvakapothe, u can execute any shell script from this program with that name....if its relative path.
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Legend
Username: Maverick

Post Number: 55873
Registered: 01-2008
Posted From: 98.222.238.98

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 09:05 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Saint:




Say you are creating a file..

Touch test.txt. Put this in a shell script. Say test.sh..chmod 777 test.sh..
In your java exec sudo /path/test.sh
Happy Vizag
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Legend
Username: Maverick

Post Number: 55872
Registered: 01-2008
Posted From: 98.222.238.98

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 09:03 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Shell script has to have exec permissionu
Happy Vizag
Top of pagePrevious messageNext messageBottom of page Link to this message

Saint
Legend
Username: Saint

Post Number: 45076
Registered: 01-2011
Posted From: 174.71.55.38

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 09:02 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:

Have the command in a custom shell script and use sudo..i think it will work




ante ela? fox example!
Top of pagePrevious messageNext messageBottom of page Link to this message

Saint
Legend
Username: Saint

Post Number: 45075
Registered: 01-2011
Posted From: 174.71.55.38

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 09:01 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Okatelugodu:

'Runtime' class lo exec method ki nee command parameter ga pass cheyyi, if all you need is to execute a Unix or Os command




scp lo aa option ledu...u can exec with other details thne it will prompt for password ...appudu password ivvali.....
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Legend
Username: Maverick

Post Number: 55871
Registered: 01-2008
Posted From: 98.222.238.98

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 09:01 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Have the command in a custom shell script and use sudo..i think it will work
Happy Vizag
Top of pagePrevious messageNext messageBottom of page Link to this message

Saint
Legend
Username: Saint

Post Number: 45073
Registered: 01-2011
Posted From: 174.71.55.38

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 09:00 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Santhi_swaroop:



properties files loo password petti danni nunchi read cheyachu gaa? I am not Java expert u know that :D But I used this kind of logic in my ant script.




that is another option u have in scp. but I want only this way. U can store password in a file and input that file with scp command..but storing password in a file is not an option.
Top of pagePrevious messageNext messageBottom of page Link to this message

Saint
Legend
Username: Saint

Post Number: 45072
Registered: 01-2011
Posted From: 174.71.55.38

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 08:59 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Tugoboy:

JSch o...3 ways authentications untayi.
1)normal password
2)interactive
3)certificate
Normal exec lo ....SSH tunneling cheyyaleu ani naa feeling. Oka vela cheyyali ante..chala kadhalu padali.....
happy gaa ee sariki....JSch ni vadeseyyi.

by the way...ee type authentication use cheyyalo....entirely depends upon your SSH server config!!




jsch is not an option. I need to do password authentication. it has to be scp using exec.
Top of pagePrevious messageNext messageBottom of page Link to this message

Okatelugodu
Side Hero
Username: Okatelugodu

Post Number: 7926
Registered: 02-2008
Posted From: 24.190.235.121

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 08:52 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

'Runtime' class lo exec method ki nee command parameter ga pass cheyyi, if all you need is to execute a Unix or Os command
Top of pagePrevious messageNext messageBottom of page Link to this message

Santhi_swaroop
Side Hero
Username: Santhi_swaroop

Post Number: 2119
Registered: 10-2014
Posted From: 198.203.181.181

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 08:14 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Saint:

I am using exec method to run a UNIX command and it will prompt for password.

I want to submit password without prompting within the code.

How can I do it? I tried multiple ways(BufferedReader,PrintWriter, BufferedWriter) but didnt work.

any java thopus here? TIA




properties files loo password petti danni nunchi read cheyachu gaa? I am not Java expert u know that :D But I used this kind of logic in my ant script.
ee Santhi_Swaroop flash back loo Paga_Babai_Paga :D
Top of pagePrevious messageNext messageBottom of page Link to this message

Tugoboy
Comedian
Username: Tugoboy

Post Number: 1680
Registered: 03-2014
Posted From: 49.207.237.13

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 08:10 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

JSch o...3 ways authentications untayi.
1)normal password
2)interactive
3)certificate
Normal exec lo ....SSH tunneling cheyyaleu ani naa feeling. Oka vela cheyyali ante..chala kadhalu padali.....
happy gaa ee sariki....JSch ni vadeseyyi.

by the way...ee type authentication use cheyyalo....entirely depends upon your SSH server config!!
Top of pagePrevious messageNext messageBottom of page Link to this message

Ringo_rangaswamy
Hero
Username: Ringo_rangaswamy

Post Number: 10722
Registered: 02-2011
Posted From: 24.47.142.216

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 02:13 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Saint:




This is not Java Core, This is Java Hard core. Bump.
Top of pagePrevious messageNext messageBottom of page Link to this message

Humpty_dumpty
Moderator
Username: Humpty_dumpty

Post Number: 29873
Registered: 02-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 02:13 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Saint:

jsch etc vadataniki approval ledu...apache library kaadu kada..3rd party library ani...


aadi bondhaa ani seppu

OS nundi vachay message antha single stream lo vasthaayi in most cases when using process builder etc
error, warning, regular log anni okay log level print sesi later savaali to read

must and should gaa

jsch nee apache kontundhee ani seppi set cheyyi..satyagrahi dates amminattu :D
Top of pagePrevious messageNext messageBottom of page Link to this message

Jalsa
Legend
Username: Jalsa

Post Number: 30391
Registered: 02-2008
Posted From: 159.53.46.141

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 02:11 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Saint:

jsch etc vadataniki approval ledu..



jsch open source kadha, aadu ettaa chestannaado choodu oka pali
Top of pagePrevious messageNext messageBottom of page Link to this message

Saint
Legend
Username: Saint

Post Number: 45050
Registered: 01-2011
Posted From: 12.22.163.132

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 01:52 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Goonda:

use ssh keys to connect to server... why do you want to send the password.




naako ranku mogudu dorikadu annai....ive specs..ide kavali annadu....ssh keys tho easy ga ipoddi..but nahin annadu...jsch etc vadataniki approval ledu...apache library kaadu kada..3rd party library ani...

so adi matter..!
Top of pagePrevious messageNext messageBottom of page Link to this message

Goonda
Megastar
Username: Goonda

Post Number: 24502
Registered: 02-2007
Posted From: 146.18.173.101

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 01:49 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

other than telnet, you can not connect to unix server using core java.. you need to use some API like jalsa mentioned jch or jsh..
Top of pagePrevious messageNext messageBottom of page Link to this message

Goonda
Megastar
Username: Goonda

Post Number: 24501
Registered: 02-2007
Posted From: 146.18.173.101

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 01:46 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

use ssh keys to connect to server... why do you want to send the password.
Top of pagePrevious messageNext messageBottom of page Link to this message

Saint
Legend
Username: Saint

Post Number: 45045
Registered: 01-2011
Posted From: 12.22.163.132

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 01:41 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Royyala_nayudu:

Add parameters to your method, While invoking pass the passwd.




parameters pass chsthe passwd pass ipodda? how?
Top of pagePrevious messageNext messageBottom of page Link to this message

Saint
Legend
Username: Saint

Post Number: 45042
Registered: 01-2011
Posted From: 12.22.163.132

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 01:39 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Jalsa:

If you are trying SFTP, then use Jsch.


this is much easier..no jsch. it shud be thru exec only!
Top of pagePrevious messageNext messageBottom of page Link to this message

Jalsa
Legend
Username: Jalsa

Post Number: 30390
Registered: 02-2008
Posted From: 159.53.174.142

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 01:31 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

If you are trying SFTP, then use Jsch.
Top of pagePrevious messageNext messageBottom of page Link to this message

Royyala_nayudu
Side Hero
Username: Royyala_nayudu

Post Number: 4219
Registered: 04-2014
Posted From: 205.144.127.200

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 01:29 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Add parameters to your method, While invoking pass the passwd.
Top of pagePrevious messageNext messageBottom of page Link to this message

Saint
Legend
Username: Saint

Post Number: 45030
Registered: 01-2011
Posted From: 12.22.163.132

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, February 24, 2015 - 01:13 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

I am using exec method to run a UNIX command and it will prompt for password.

I want to submit password without prompting within the code.

How can I do it? I tried multiple ways(BufferedReader,PrintWriter, BufferedWriter) but didnt work.

any java thopus here? TIA

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image HASH(0x97711ec){Movie Clipart}
Show / hide regular icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Show / Hide Filmy icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: