News for hackers. Stuff that matters.
Re:Don Libes' Expect: A Surprisingly Underappreciated Unix A... by pmoriarty on Saturday November 23, 2019 @11:59AM (#21615040)
I've recently become a fan of expect-lite[1], which has a much simpler syntax.

Here are some examples:

  Check the IP address of the localhost

  >ifconfig
  <192\.168\.1\.1
  >ip -6 addr show
  <2001:db8::f00d

  ssh to a remote host

  >ssh root@host-021
  <assword:
  >>secret_password
  # issue a command once logged in
  >ls
  >exit
[1] - http://expect-lite.sourceforge.net/
Re:Don Libes' Expect: A Surprisingly Underappreciated Unix A... by ohithereyou on Sunday November 24, 2019 @08:09AM (#21620191)
Inputting an SSH password using an expect script seems like an anti-pattern to me. In general, why can't you use a password-less key on the client and restrict what commands it can execute in the authorized_keys file on the server?
Re:Don Libes' Expect: A Surprisingly Underappreciated Unix A... by ebcode on Sunday November 24, 2019 @10:30PM (#21625218)
... because you don't control the server?
Re:Don Libes' Expect: A Surprisingly Underappreciated Unix A... by erredois on Saturday November 23, 2019 @07:05PM (#21617447)
Thank you for this, looks amazing to create simple tests