Telnet script
- From: MOULINE Kamal <mouline@xxxxxx>
- Date: Fri, 23 Feb 2007 00:54:43 +0000
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@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Prev by Date: Solaris 10 Exam
- Next by Date: How to encapsulate disks using veritas volume manager under vmware workstation for solaris 10 x86
- Previous by thread: Solaris 10 Exam
- Next by thread: How to encapsulate disks using veritas volume manager under vmware workstation for solaris 10 x86
- Index(es):
Relevant Pages
|