| Author |
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: |
     |
Use scp with keys ke convince cheyyi |
   
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: |
     |
Saint:
sudo wil not ask for pass..i didnt get the vulnerability piece..see if sudo works..we can tlak abt vulnerability Happy Vizag |
   
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: |
     |
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... |
   
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: |
     |
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 |
   
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: |
     |
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 |
   
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: |
     |
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. |
   
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: |
     |
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 |
   
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: |
     |
Shell script has to have exec permissionu Happy Vizag |
   
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: |
     |
Maverick:Have the command in a custom shell script and use sudo..i think it will work
ante ela? fox example! |
   
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: |
     |
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..... |
   
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: |
     |
Have the command in a custom shell script and use sudo..i think it will work Happy Vizag |
   
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: |
     |
Santhi_swaroop: properties files loo password petti danni nunchi read cheyachu gaa? I am not Java expert u know that 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. |
   
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: |
     |
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. |
   
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: |
     |
'Runtime' class lo exec method ki nee command parameter ga pass cheyyi, if all you need is to execute a Unix or Os command |
   
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: |
     |
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 But I used this kind of logic in my ant script. ee Santhi_Swaroop flash back loo Paga_Babai_Paga  |
   
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: |
     |
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!! |
   
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: |
     |
Saint:
This is not Java Core, This is Java Hard core. Bump. |
   
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: |
     |
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  |
   
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: |
     |
Saint:jsch etc vadataniki approval ledu..
jsch open source kadha, aadu ettaa chestannaado choodu oka pali |
   
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: |
     |
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..! |
   
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: |
     |
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.. |
   
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: |
     |
use ssh keys to connect to server... why do you want to send the password. |
   
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: |
     |
Royyala_nayudu:Add parameters to your method, While invoking pass the passwd.
parameters pass chsthe passwd pass ipodda? how? |
   
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: |
     |
Jalsa:If you are trying SFTP, then use Jsch.
this is much easier..no jsch. it shud be thru exec only! |
   
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: |
     |
If you are trying SFTP, then use Jsch. |
   
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: |
     |
Add parameters to your method, While invoking pass the passwd. |
   
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: |
     |
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 |