mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-18 03:46:03 +00:00
Provide a fast way to delete entries from OpenSSH's known_hosts
file. This is a simple automation of the things normally done by the user when having an "offending key" in his/her known_hosts file caused by a changing host key of the destination. WWW: http://unssh.sourceforge.net/ PR: ports/137254 Submitted by: Dax Labrador <semprix at bsdmail.org>
This commit is contained in:
parent
9cdb26edd1
commit
7cde05613f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=248159
@ -840,6 +840,7 @@
|
||||
SUBDIR += umit
|
||||
SUBDIR += unhide
|
||||
SUBDIR += unicornscan
|
||||
SUBDIR += unssh
|
||||
SUBDIR += vida
|
||||
SUBDIR += vinetto
|
||||
SUBDIR += vlock
|
||||
|
35
security/unssh/Makefile
Normal file
35
security/unssh/Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
# New ports collection makefile for: unssh
|
||||
# Date created: 30 July 2009
|
||||
# Whom: Dax Labrador <semprix@bsdmail.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= unssh
|
||||
PORTVERSION= 1.4
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= SF
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME:L}/${PORTNAME:L}/${PORTNAME:L}-${PORTVERSION}
|
||||
|
||||
MAINTAINER= semprix@bsdmail.org
|
||||
COMMENT= Fast way to delete entries from OpenSSH known_hosts file
|
||||
|
||||
RUN_DEPENDS= bash:${PORTSDIR}/shells/bash
|
||||
|
||||
NO_BUILD= yes
|
||||
PLIST_FILES= bin/unssh
|
||||
|
||||
PATCH_LIST= extra-patch-unssh.sh
|
||||
EXTRA_PATCHES= ${PATCH_LIST:C|^|${WRKDIR}/|g}
|
||||
|
||||
pre-patch:
|
||||
.for patch in ${PATCH_LIST}
|
||||
@${SED} ${_SUB_LIST_TEMP} ${FILESDIR}/${patch}.in > ${WRKDIR}/${patch}
|
||||
.endfor
|
||||
|
||||
do-install:
|
||||
@${INSTALL} -d ${PREFIX}/bin
|
||||
@${CP} ${WRKSRC}/unssh.sh ${PREFIX}/bin/unssh
|
||||
@${CHMOD} ${BINMODE} ${PREFIX}/bin/unssh
|
||||
|
||||
.include <bsd.port.mk>
|
3
security/unssh/distinfo
Normal file
3
security/unssh/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (unssh-1.4.tar.gz) = c5045e0420a4ac81f53499f59e071915
|
||||
SHA256 (unssh-1.4.tar.gz) = 8252d0818d044452241a279031a903634b983cf94e4671e32f4df5a754f686f2
|
||||
SIZE (unssh-1.4.tar.gz) = 11381
|
26
security/unssh/files/extra-patch-unssh.sh.in
Normal file
26
security/unssh/files/extra-patch-unssh.sh.in
Normal file
@ -0,0 +1,26 @@
|
||||
--- ./unssh.sh.orig 2009-07-12 19:31:45.000000000 -0400
|
||||
+++ ./unssh.sh 2010-01-18 17:57:11.000000000 -0500
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!%%LOCALBASE%%/bin/bash
|
||||
# This simple script helps deleting hosts from the user's known_hosts
|
||||
# file when their pubkey has changed.
|
||||
# Copyright (C) 2006-2009 by Phil Sutter <phil@nwl.cc>
|
||||
@@ -52,7 +52,7 @@
|
||||
return $1
|
||||
}
|
||||
search_in_sshcnf() { # (expr)
|
||||
- grep -qi "^host $1$" $SSH_CNF || return 1
|
||||
+ grep -qi "^host $1$" $SSH_CNF >/dev/null 2>&1 || return 1
|
||||
# the code below calls awk in three steps:
|
||||
# * filter empty and commented out lines
|
||||
# * divide content into records containing a single "Host" definition
|
||||
@@ -107,7 +107,7 @@
|
||||
name="$1"
|
||||
fi
|
||||
# does a host lookup to get the corresponding IP/hostname
|
||||
- eval "$(hostx "$name" 2>&1 | \
|
||||
+ eval "$(nslookup "$name" 2>&1 | \
|
||||
awk '/exist/{exit 1} \
|
||||
/Name:/{print "LU_HOST="$2} \
|
||||
/Address:/{print "LU_IP="$2} \
|
6
security/unssh/pkg-descr
Normal file
6
security/unssh/pkg-descr
Normal file
@ -0,0 +1,6 @@
|
||||
Provide a fast way to delete entries from OpenSSH's known_hosts
|
||||
file. This is a simple automation of the things normally done by
|
||||
the user when having an "offending key" in his/her known_hosts file
|
||||
caused by a changing host key of the destination.
|
||||
|
||||
WWW: http://unssh.sourceforge.net/
|
Loading…
Reference in New Issue
Block a user