From 9b42d1e85a65a7ad96e062c66ac0b3f502fdee3f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 23 Jan 2012 08:54:42 +0100 Subject: [PATCH] add script to remove specific line in ~/.ssh/known_hosts Signed-off-by: Nico Schottelius --- ssh_remove_line | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 ssh_remove_line diff --git a/ssh_remove_line b/ssh_remove_line new file mode 100755 index 0000000..d12e398 --- /dev/null +++ b/ssh_remove_line @@ -0,0 +1,30 @@ +#!/bin/sh +# +# 2012 Nico Schottelius (nico-nsbin at schottelius.org) +# +# This file is part of nsbin. +# +# nsbin is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# nsbin is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with nsbin. If not, see . +# +# +# Remove specific line in ~/.ssh/known_hosts + +if [ $# -ne 1 ]; then + echo "$0: " + exit 1 +fi + +line="$1"; shift + +~/bin/remove_line ~/.ssh/known_hosts "$line"