Difference between revisions of "Expect remote commands"
From WA2IAC Wiki
(Execute a list of commands on a remote machine using Tcl and Expect) |
m (→Gotchas) |
||
Line 52: | Line 52: | ||
uptime | uptime | ||
uname -a | uname -a | ||
− | <pre> | + | </pre> |
No biggies there. You'll get into problems, however, if you use characters that are special to tcl, like '{', '}', and even '#'. So, you've been warned. | No biggies there. You'll get into problems, however, if you use characters that are special to tcl, like '{', '}', and even '#'. So, you've been warned. | ||
== My Two Cents == | == My Two Cents == | ||
+ | |||
It's a lot easier to do this using "rsh", however, with today's security paranoia, the "r" commands are disabled by default. This is silly when you're operating on a protected LAN, especially if it's solo. Do you suffer from multiple personality disorder (MPD)? If so, is one of your personalities a terrorist threatening to attack America? If not, then it might be OK to enable those "r" commands. | It's a lot easier to do this using "rsh", however, with today's security paranoia, the "r" commands are disabled by default. This is silly when you're operating on a protected LAN, especially if it's solo. Do you suffer from multiple personality disorder (MPD)? If so, is one of your personalities a terrorist threatening to attack America? If not, then it might be OK to enable those "r" commands. | ||