how to automate telnet thro' expect cmd
From: karthikeyan (thegreatkarthik_at_yahoo.co.in)
Date: 07/31/03
- Next message: Innocenti Maresin: "Re: how to automate telnet..."
- Previous message: Peter Clinch: "Re: Linux Backup Question"
- Next in thread: Innocenti Maresin: "Re: how to automate telnet..."
- Reply: Innocenti Maresin: "Re: how to automate telnet..."
- Maybe reply: Mark Cecil: "Re: how to automate telnet thro' expect cmd"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Jul 2003 05:31:27 -0700
sir,
I want to automate my telnet connection(instead of typing
repeated username & password)
I suppose i can write expect script
#!/usr/bin/expect
eval spawn telnet ip
set timeout 20
expect login:
send "username\r"
expect password:
send "password\r"
sleep 2
interact
when i 'm running sh scriptname i 'm getting the error "command
spawn not found"
i removed the spawn
even the system says
telnet hostname
login:
(but it didn't proceeds with username & passwd which i send in the
script
help me
- Next message: Innocenti Maresin: "Re: how to automate telnet..."
- Previous message: Peter Clinch: "Re: Linux Backup Question"
- Next in thread: Innocenti Maresin: "Re: how to automate telnet..."
- Reply: Innocenti Maresin: "Re: how to automate telnet..."
- Maybe reply: Mark Cecil: "Re: how to automate telnet thro' expect cmd"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|