ssh scripting

From: VEGH Karoly (karoly.vegh@uta.at)
Date: Wed May 05 2004 - 03:39:32 EDT


I'm having a prob with scripting over ssh.
If I try to start a script over ssh on another machine,
it hangs after finishing the script, and without a ctrl+c it doesn't
return:

oracle:tisdwh04.utalan.at $ ssh tisdwh03 ' echo " ###### Trying to start DB on tisdwh03"
> /home/oracle/startdb.sh
> echo RETVAL=$?
> '
 ###### Trying to start DB on tisdwh03

LSNRCTL for Solaris: Version 9.0.1.4.0 - Production on 30-APR-2004 16:32:10

[...]

With the Partitioning option
JServer Release 9.0.1.4.0 - Production
RETVAL=0

                                <--- and here it stands

^CKilled by signal 2. <--- here I pushed ctrl-c
oracle:tisdwh04.utalan.at $

locally started the script (on tisdwh03) (/home/oracle/startdb.sh)
returns alright.

but over ssh somehow he comes to hang, not the script, since the
'echo RETVAL=$?' will be executed as well, but somehow he cannot terminate
the session...

any ideas?

everything else can started over ssh just fine,
like 'cat /home/oracle/startdb.sh':

oracle:tisdwh04.utalan.at $ ssh tisdwh03 ' cat /home/oracle/startdb.sh
> echo RETVAL=$?
> '
. /home/oracle/ias902i.env
export ORACLE_SID=iasdb
lsnrctl start
sqlplus /nolog <<EOF
connect / as sysdba
startup
EOF
RETVAL=0
oracle:tisdwh04.utalan.at $

I am using OpenSSH:

oracle:tisdwh04.utalan.at $ ssh -v tisdwh03
OpenSSH_3.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090603f
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: restore_uid
debug1: ssh_connect: getuid 101 geteuid 101 anon 1
debug1: Connecting to tisdwh03 [172.21.26.21] port 22.
debug1: temporarily_use_uid: 101/15 (e=101)
debug1: restore_uid
debug1: temporarily_use_uid: 101/15 (e=101)
debug1: restore_uid
debug1: Connection established.
debug1: identity file /home/oracle/.ssh/identity type -1
debug1: identity file /home/oracle/.ssh/id_rsa type 1
debug1: identity file /home/oracle/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_3.1p1

it doesnt even work so:

ssh tisdwh03 ' echo "Trying to start DB on tisdwh03" ; cd /home/oracle/; ./startdb.sh ; echo RETVAL=$?; kill -KILL $$'

any help is appreciated, and I will definitely summarize.

charlie

-- 
Vigh Karoly -  System Engineer - UTA - TIS.SAS.BSS
"There are two major products that come out of Berkeley: LSD and UNIX.
 We don't believe this to be a coincidence." 
 				- Jeremy S. Anderson
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:28:36 EDT