Don't store key when using SSH Proxy

  • 2
  • Idea
  • Updated 5 years ago
I keep being bothered by having to delete the ssh key from the known_hosts file every time I use the SSH Proxy. On this web page I found a great workaround -
Now I have a command in a script: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no admin@localhost -p 10000

And as an iTerm user on the Mac I put this command in a Profile called Aerohive Proxy.

Hope this helps someone!
Photo of Fraser Hess

Fraser Hess

  • 60 Posts
  • 7 Reply Likes

Posted 5 years ago

  • 2
Photo of Mike Kouri

Mike Kouri, Official Rep

  • 1030 Posts
  • 271 Reply Likes
Thanks for sharing this!! I've had the same concern, this will be very useful!
Photo of thewifigeek

thewifigeek, Champ

  • 86 Posts
  • 12 Reply Likes
ssh-keygen -R "IP address" !!This will remove the key from known_hosts.

Enjoy my fellow Mac brother.