News for hackers. Stuff that matters.
Re:Ask HN: What's your favorite CLI or ncurses program? by g0rfel on Friday September 04, 2015 @04:50AM (#10169366)
ATM when testing deployment flow:

  function sd()  {
  n=2
  while [ $n -gt 0 ]
    do
      sed -i ''"${1}"'d' $HOME/.ssh/known_hosts
      n=$(($n-1))
    done
  }
I like sed.
Re:Ask HN: What's your favorite CLI or ncurses program? by balthamos89 on Sunday September 06, 2015 @01:25AM (#10176874)
If you are careful, you can avoid that annoying problem altogether:

ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $1

Re:Ask HN: What's your favorite CLI or ncurses program? by ta0967 on Friday September 04, 2015 @08:01AM (#10169850)
that

    ''"${1}"'d'
is needlessly complicated. this would do the same:

    "${1}d"
Re:Ask HN: What's your favorite CLI or ncurses program? by anjanb on Friday September 04, 2015 @05:51AM (#10169504)
care to explain what the script does and how ncurses is involved here ?
Re:Ask HN: What's your favorite CLI or ncurses program? by marios on Friday September 04, 2015 @06:33AM (#10169623)
It removes a line from the known_host file. When spinning up a new VM/container or reaching a machine that has an IP/hostname you've used before (happens a lot in dev environments/NATed networks), you'll get a warning about a possible MITM attack.

ncurses is not involved though.