4 ms·
This tool keeps the command line interpreter (CLI) alive. Sysadmins everywhere can glue hundred different systems from a hundred different vendors together if t
by ChuckMcM 10y ago
This tool keeps the command line interpreter (CLI) alive. Sysadmins everywhere can glue hundred different systems from a hundred different vendors together if they have CLI and the sysadmin has access to a machine that runs expect(1).
There are many stories of complex infrastructure being taken down by new firmware on routers or switches that change the order of parameters in a command :-)
- kazinator 10y agoRather, this tool keeps alive systems that do not have easily scriptable command interfaces, and must be driven at the character-level through their interactive visual interfaces. If the system has a CLI, you write a script in that CLI; you don't write an expect script. Sometimes systems have CLI, but only behind a remote access wall (telnet, serial, ...); then you might use expect---because there is no way to upload a script and dispatch it.
- ChuckMcM 10y ago> Sometimes systems have CLI, but only behind a > remote access wall (telnet, serial, ...); then > you might use expect- All managed switches, all routers, and all PDUs pretty much.
- kazinator 10y agoWell, perhaps not quite all routers, like this cheap consumer device: $ ssh root@router uname -a root@router's password: Linux router 2.4.20 #1 Sun Jun 27 20:13:35 PDT 2010 mips GNU/Linux The only use case for Expect here is typing in the password, which we can eliminate by administering some SSH keys.
- mypalmike 10y agoAnd then there are the "enterprise switches" from at least one major vendor, whose crappy ssh implementation only supports a single tty channel (no exec channels), so you have to run expect anyhow. :-( $ ssh root@router uname -a Connection closed by shitty ssh implementation. $ ssh root@router Welcome to router! >