SSH - known_hosts ... Quick editing tools available?
I'm hitting up the LQ community with a question on how to simplify an annoyance.
Question is...are there any tools in existence command line or GUI that can allow you to quick edit your ~/.ssh/known_hosts file? I'd like something that perhaps lists the IP/URL and allows you to just click and delete or pass the IP/URL to a command line util for deletion. It'd be handy to have for DHCP environments where the ip address/key pair frequently changes. -Corr |
Code:
function ssh_knownhosts_cfg() { # Edit your ~/.ssh/known_hosts - This can only disable enabled hosts and enable disabled hosts. - This should cover host lines with and without options. - Check if my 'awk' and 'sed' needs improvement. - Remove the echo and escapes from the sed lines. - Add to your ~/.bashrc (or source a separate alias library, I do). - Backup your ~/.ssh/known_hosts and don't tell me I didn't warn you. - Type 'ssh_knownhosts_cfg' to run it. - If it nukes your known_hosts file or your box you keep the fallout. |
All times are GMT -5. The time now is 02:40 PM. |