Telnet using expect
Hi guys,
Basically I need to telnet login to a machine, then run some commands. I've sorted the login bit, and this works: (the following is a new file that is called into an existing script) Code:
#!/usr/bin/expect Not sure what I'm missing. Heres pseudo for what I need to happen: Code:
|
Quote:
Don't know how you're calling your mount statement, but are you putting it in as Code:
send "mount <device> <path>" |
No, im designing the system on a private network before putting it public. Using root just for the sake of permissions. Will be changing it to a user with SU before it goes anywhere public.
Yeah, thats how I'm sending the command, but it freezes after entering the password. If I put the interact command after the send "password\r" it allows me to continue 'interacting' with the telnet session, however if i try to send another command it just stalls and ends the script. |
Quote:
|
All times are GMT -5. The time now is 08:39 PM. |