I would like to answer each one of them individually.
@Tom de
Hi,the weirdness of the problem is that the script is getting executed when logging on from the environment B ,and is not getting executed when called remotely from server A.
If it is getting executed when logging on from the server B ,then why it si not identifying the script when called remotely?? Weird ,isn't it??
@ mehrdad68
Hi, I already tried using here document ,but to no awail.
My script goes in an indefinite loop and command prompt never returns back while executing this logic.
@ ShawnMilo
Hi, I am not running anything graphical.
The script that is being run just checks the diskspace of the system and informs the user if the threshold increases.
I hope I have made myself clear.
Could anyone guide me now towards the solution of this problem??
debug: Connecting to 10.40.6.172, port 22... (SOCKS not used)
debug: client supports 3 auth methods: 'publickey,keyboard-interactive,password'
debug: Ssh2Common/sshcommon.c:496: local ip = 10.40.6.172, local port = 61722
debug: Ssh2Common/sshcommon.c:498: remote ip = 10.40.6.172, remote port = 22
debug: Remote version: SSH-2.0-ReflectionForSecureIT_6.1.0.16
debug: Remote host key found from database.
debug: server offers auth methods 'publickey,password'.
debug: Constructing and sending signature in publickey authentication.
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:1615: Public key authentication was successful.
Authentication successful.
debug: Requesting X11 forwarding with authentication spoofing.
rcmd: -l: Unknown host
test4.sh[9]: test: Specify a parameter with this command.
rcmd: -l: Unknown host
test4.sh[18]: test: Specify a parameter with this command.
rcmd: -l: Unknown host
test4.sh[28]: test: Specify a parameter with this command.
test4.sh[35]: test3.sh: not found.
debug: Got session close with exit_status=1
Can anyone help me out here??
Thanks in advance...
This means two things are happening; your '-l' option isn't used correctly. '-l' needs a login name:
So, you get:
This can probably be ignored, it's not your problem - as the rest of this works. But maybe clean it up. SSH thinks '-l' is a host.
Now, the second part is:
( I removed the "rcmd: -l: Unknown host" error, as it's a different problem)
Above your problem is in "test4.sh" you are executing a 'test' function. Either the word 'test' or something like 'if (-d file.sh)'. For whatever reason, you are trying to use a shell 'test' in way that requires a parameter see lines 9, 18, 28. And then on line 35 your script is looking for test3.sh.
Now, this could be because b's environment is setup to see all of the files
( maybe a path issue, maybe environment variables point to files ), and a's environment isn't setup to see the same paths/env-vars.
You can test this by putting the full path to a file in 'test4.sh'. Or investigating b's environment vs. a's.
maybe put up 'test4.sh' so we can see what its trying to do.
test4.sh[9]: test: Specify a parameter with this command.
Code:
echo "quota of your application environment has increased ,kindly delete the unwanted files "
#else
#echo " quota is lessss,u can continue"
fi
remsh $HOST -l $TLG_RATER_USR_ID -n "quota -v" > fill3
rcmd: -l: Unknown host
Code:
size1=`awk 'NR==3 {print $2}' fill3`
if [ $size1 -ge $a ] ; then
echo "quota of your rater environment has increased,kindly delete the unwanted files"
test4.sh[18]: test: Specify a parameter with this command.
Code:
#else
#echo " quota is lessss,u can continue"
fi
export TUXEDO_USR_ID=`basename $TUX_HOME`
remsh $HOST -l $TUXEDO_USR_ID -n "quota -v" > fill2
rcmd: -l: Unknown host
Code:
size2=`awk 'NR==3 {print $2}' fill2`
if [ $size2 -ge $a ] ; then
echo "quota of your tuxedo environment has increased ,kindly delete the unwanted files "
test4.sh[28]: test: Specify a parameter with this command.
Code:
#else
#echo " quota is lessss,u can continue"
fi
. taran_test1
test4.sh[35]: test3.sh: not found.<--- path problem!
Having the script helps, as we don't have to guess at what is happening. Simply put your variables aren't working. $HOST, $a, and probably $TLG_USR_ID.
I'll assume 'taran_test1' has the var's we need, but we aren't getting the vars. Investigate taran_test1 for more clues.
Hi Tom,Appreciate your help in this regard.But I am unable to understand if the variables are working when run from server B ,then wy they are not working when called from server A.As fara s taran_test1 goes,it should be test3.sh.I just forgot to rename the variable.Hope i am making myself clear??Kindly advise..Many ThanksTaran
I am able to login to server x from y in shell script. But after that command is get executed on server y. I need the command to be executed on server x.
Ex.
ssh -n 0.0.0.X
ls -ltr
Above script I am executing from 0.0.0.Y
I got result but it executed on server Y server. But when I use ssh... (4 Replies)
Hi ,
I have done the following things, but still i am not able to connect remote system without enter password.
steps:
1) ssh-keygen -t rsa
2) transfered id_rsa.pub file into remote server.
3) I hve redirect id_rsa.pub content to authorized_keys file.
Note: I have done the same in another... (6 Replies)
Hi guys.
I am using VirtualBox to run Solaris on my host (Windows 7) .
I have setup networking and am able to ping from Solaris to Windows 7 and vice versa.
Now I want to be able to SSH from Windows 7 to my guest (Solaris)
On solaris , the output to
ps -ef | grep ssh shows:
... (8 Replies)
Hello,
i have 10 machines, machine A execute this script:
This is my script:
nb_lignes=`wc -l $1 | cut -d " " -f1`
for i in $(seq $(($nb_lignes - 1)) )
do
machine=`head $1 -n $i | tail -1`
machine1=`head $1 -n $nb_lignes | tail -1`
ssh root@$machine -x " scp /home/file.txt... (7 Replies)
Hello All,
Iam using the following command to get the details from a remote server.
ssh server2 su - mqm -c "sh /var/mqm/test1.sh"
The control will not come out once I run this command.
I have set up the required public/private key between server1 and server2 and it works... (3 Replies)
Hey,
I have a Red Hat 5.2 machine with :
2.6.18-92.el5 kernel
PRM's:
openssh-4.3p2-29.el5
openssh-clients-4.3p2-29.el5
openssl-0.9.8e-7.el5
openssh-server-4.3p2-29.el5
openssl-0.9.8b-10.el5
openssl-devel-0.9.8e-7.el5
openssh-askpass-4.3p2-29.el5
I'm trying to transfer files to a... (2 Replies)
Hi
Please help me with the following problem with my script.
The following block of code is not repeating in the while loop and exiting after searching for first message.
input_file
==========
host001-01
host001-02
2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
Hi
I am using ssh and facing problem. When I execute a command which is my application specific it hangs after giving initial message.Program does not return to command prompt but process is completed in background.
e.g I run following command
$ dtsbackup... (4 Replies)
Hi,
What the problem is that we have a client that has now decided to use SSH protocol 2 only for their internal security audit. This is not a problem except now our SCO system will not connect.
I can connect with putty from a windows box fine until the SCO system tries to access which then... (0 Replies)
Hi,
Just recently we seem to be getting the following error message relating to SSH when we run the UNIX script in background mode:
warning: You have no controlling tty. Cannot read confirmation.^M
warning: Authentication failed.^M
Disconnected; key exchange or algorithm negotiation... (1 Reply)