Automation on linux machine
Closed
leela
-
Jun 2, 2009 at 08:34 AM
ageny Posts 12 Registration date Saturday March 28, 2009 Status Member Last seen June 18, 2009 - Jun 2, 2009 at 09:11 AM
ageny Posts 12 Registration date Saturday March 28, 2009 Status Member Last seen June 18, 2009 - Jun 2, 2009 at 09:11 AM
Related:
- Automation on linux machine
- Kali linux download - Download - Linux
- Wine themes linux - Guide
- Linux install tar.gz - Guide
- Can't ping machine on same network - Guide
- Get machine name from ip - Guide
1 reply
ageny
Posts
12
Registration date
Saturday March 28, 2009
Status
Member
Last seen
June 18, 2009
Jun 2, 2009 at 09:11 AM
Jun 2, 2009 at 09:11 AM
Did you try creating a shell script?
You can try this:
You can try this:
#!/usr/local/bin/expect spawn telnet <machine ip> expect "login:" send "<username>\n" expect "Password:" send "<password>\n" send "bash\n" send "cd /opt\n" send "ls -ltr\n"  (if you are not giving \n then it will wait for your response or u have to type enter manually). interact How to execute the “expect“ command expect –f <file name> Ex: expect –f <filename>.expect