Yes i have done already passwordless access.It means when i run this command on unix terminal it dont for password.
On terminal i run like:
ssh username@machinename 'ls dirname' ##it never promp me for password
ssh uses your ~/.ssh/id_rsa file to log in without a password. The server you want into compares that with a key you gave it. ssh is extremely particular about who is allowed to read this file -- for your webserver to use it, it needs its own copy that belongs to it and can't be read by anybody else. If it thinks the security is lax enough for the key to be stolen, ssh will refuse to operate passwordlessly.
In a root terminal, do this once:
It might be id_dsa instead of id_rsa, but dsa keys are old now.
Then, in your cgi script, you would run ssh -i /etc/apache-key/id_rsa username@host ls /dir/ and, if everything's where it belongs and has the right permissions, ssh should be able to get in without a password.
buddy i am not sure that i will be able to do these keys operation. So plz give me best commands with little description. i would be very thankful to you.
So after this would i be able to do SCP operation??
---------- Post updated at 12:33 AM ---------- Previous update was at 12:32 AM ----------
buddy i am not sure that i will be able to do these keys operation.
If you don't have root access, it's going to be difficult to get keys with the right permissions. You might have to ask an administrator to do it for you.
Quote:
So after this would i be able to do SCP operation?
Yes, scp is part of ssh and uses the same keys. scp -i /etc/apache-keys/id_dsa ...
What? No. All you're doing is making the right folders and copying the right files into the right place with the right permissions. You do it once, in private, typing it into a root terminal for your webserver. It's not part of your CGI script, and your CGI script itself never needs root.
Quote:
And i know root password even i have sudo access also. Can you illustrate Keys process and commands what i have to do on terminal now buddy ?
I don't know to debug the program todaylive.pl program.
plz someone let me know what are the commands I need to know to debug the perl programs to find out the error on it. (3 Replies)
Hi All,
I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet.
I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet.
print "<center><table... (2 Replies)
Hi team,
I have a typical problem with cgi pages in apache webserver in WINDOWS
I am able to execute(display) the pages that are saved in cgi-bin folder.
But I am not able to execute the pages stored in htdocs or other folder other than cgi-bin folder.
Could anyone please let me know how... (1 Reply)
Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect.
Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is
redirected to welcome page.
My... (3 Replies)
Hi,
I am trying to implement a server monitoring dashboard using cgi scripting. I am planning to run the necessary unix scripts from the web page using cgi. This method works fine for standard unix commands but I am unable to run some external unix commands (like swadm show_processes, swadm... (9 Replies)
I got the below error when using the below code...it seem that perl interpret the "'" in the middle and therefore the pipe is not finished.
perl -wle '
@a=`who| perl -wlane 'print \$F;' | sort -u` ;
chomp @a ;
print @a;
'
the error message in cygwin is:-
perl: No match.
| sort... (12 Replies)
Hello everyone,
I have developed a cgi application on windows. i have created a folder in webapps of tomcat, within that a WEB-INF folder and in that cgi folder.
This cgi folder contains one executable. The web.xml is as follows: <servlet>
<servlet-name>cgi</servlet-name>
... (2 Replies)
Hi,
I want to run a crontab job on solaris 10.5. I have configured the crontab accordingly
10 * * * * /scripts/dbalter.pl >> /scripts/cronout.txt
However this does not work .Then I go to /var/mail/root and find an error in the output:
From root@myserver Wed Feb 4 17:02:00 2009... (1 Reply)
Hi,
I have a shell script with code
. perf.env
cd $QRY_DIR
for SHELL_FILE in sql1
do
export SNAME=$SHELL_FILE
${SCRIPT_DIR}/perf_qry.sh ${SPOOL_DIR} ${DB_ENVNAME} ${NAME} &
RC=$(expr ${RC:-0} + $? )
sleep 60
if
then
echo sysdate>test1
echo query1.txt>>test1
grep -i... (6 Replies)
Hi,
I have a shell script with code
. perf.env
cd $QRY_DIR
for SHELL_FILE in sql1
do
export SNAME=$SHELL_FILE
${SCRIPT_DIR}/perf_qry.sh ${SPOOL_DIR} ${DB_ENVNAME} ${NAME} &
RC=$(expr ${RC:-0} + $? )
sleep 60
if
then
echo sysdate>test1
echo query1.txt>>test1
grep -i... (0 Replies)