I keep destroying and provisioning VMs, so ssh frequently complains that I'm being NASTY
. Mmmm...
Anyways, I wrote a fish function to banish the offending key on the line it tells me with sed
:
function forgethost
sed -i.bak {$argv}d ~/.ssh/known_hosts
end
but I'd like to keep the command quoted to protect me against (injecting) myself a little bit. When I wrap it in ''
, it then doesn't replace $argv
. Also, I'd prefer to just grab the first argument [0]
, but when I add that it also doesn't expand.