From: MOULINE Kamal (mouline@cbi.ma)
Date: Thu Feb 22 2007 - 19:54:43 EST
Hi Managers,
I need to telnet to an UNIX server with telnet and run a script
application on it, The idea is to have a script that launch scriptAppl.sh
without letting end users put the username and password for connecting
the UNIX server.
I do the following script con.sh:
###########################
#!/bin/sh
host=@IP
port=23
cmd="scriptAppl.sh"
( echo open ${host} ${port}
sleep 1
echo "user"
echo -e "\r"
sleep 1
echo "passwd"
echo -e "\r"
sleep 1
echo ${cmd}
sleep 1
echo -e "\r"
sleep 1
) | telnet
###########################
My problem is that the connection will hang up from the server after a
while
The use of telnet isn't a problem (security issues)
why the connection hang up ? how can my script stay connected ?
Kind regards,
Kamal
_______________________________________________
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:41:41 EDT