sportngin/opsicle — pull request #58 by rib3 (2014-06-25 01:37:22+00:00)
Title: Add helper to clear ssh host keys for an environment

Add helper to clear ssh host keys for an environment.

See: #57

It clears the _ip or _dns keys it finds on the instance.

Hiding the private IPs behind an argument came to mind, but I thought doing so would conflict with the goal of it being a quick / dirty way of cleaning things out.

```
$ opsicle --verbose ssh-clean-keys staging
Executing: ssh-keygen -R x.x.x.1
/Users/user/.ssh/known_hosts updated.
Original contents retained as /Users/user/.ssh/known_hosts.old
Executing: ssh-keygen -R x.x.x.2
/Users/user/.ssh/known_hosts updated.
Original contents retained as /Users/user/.ssh/known_hosts.old
Executing: ssh-keygen -R ec2-x-x-x-x.compute-1.amazonaws.com
/Users/user/.ssh/known_hosts updated.
Original contents retained as /Users/user/.ssh/known_hosts.old
Executing: ssh-keygen -R 10.x.x.x
/Users/user/.ssh/known_hosts updated.
Original contents retained as /Users/user/.ssh/known_hosts.old
Executing: ssh-keygen -R ip-10-x-x-x.ec2.internal
/Users/user/.ssh/known_hosts updated.
Original contents retained as /Users/user/.ssh/known_hosts.old
```