3 ms·
Rather, this tool keeps alive systems that do not have easily scriptable command interfaces, and must be driven at the character-level through their interactive
by kazinator 10y ago
Rather, 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! >