diff options
author | eivind <eivind@FreeBSD.org> | 2003-02-19 20:01:57 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 2003-02-19 20:01:57 +0000 |
commit | 721cb2a1c7eb92854f57ee884c64430c4b4f3470 (patch) | |
tree | bb20644194e6ffa1d8bdfebc60a1832d6c721d57 /security | |
parent | 1a46829b80e81f2bb7ad951bf001951630619393 (diff) | |
download | FreeBSD-ports-721cb2a1c7eb92854f57ee884c64430c4b4f3470.zip FreeBSD-ports-721cb2a1c7eb92854f57ee884c64430c4b4f3470.tar.gz |
Upgrade to 1.5. This include:
* Fix for using cvs-safesh with different remote and local username
* Extended scpsh implementation w/target variable
* Correction of new target message
Diffstat (limited to 'security')
-rw-r--r-- | security/safesh/Makefile | 2 | ||||
-rw-r--r-- | security/safesh/src/cvs-safesh.sh | 6 | ||||
-rw-r--r-- | security/safesh/src/safesh.sh | 19 |
3 files changed, 23 insertions, 4 deletions
diff --git a/security/safesh/Makefile b/security/safesh/Makefile index 32da551..bc11026 100644 --- a/security/safesh/Makefile +++ b/security/safesh/Makefile @@ -8,7 +8,7 @@ # PORTNAME= safesh -PORTVERSION= 1.4 +PORTVERSION= 1.5 CATEGORIES= security MASTER_SITES= # none DISTFILES= # none diff --git a/security/safesh/src/cvs-safesh.sh b/security/safesh/src/cvs-safesh.sh index 16ccfa7..e56e811 100644 --- a/security/safesh/src/cvs-safesh.sh +++ b/security/safesh/src/cvs-safesh.sh @@ -1,2 +1,6 @@ #!/bin/sh -exec safesh $1 -- "$@" +if [ "$2" = "-l" ]; then + exec safesh $3@$1 -- "$@" +else + exec safesh $1 -- "$@" +fi diff --git a/security/safesh/src/safesh.sh b/security/safesh/src/safesh.sh index 194ed20..3ea1c18 100644 --- a/security/safesh/src/safesh.sh +++ b/security/safesh/src/safesh.sh @@ -39,7 +39,7 @@ shift 2> /dev/null; HOSTDIR=$AKEYS/$USER@${HOST}-22 if [ ! -d $HOSTDIR ]; then while ! [ "$answer" = "yes" -o "$answer" = "no" ]; do - echo -n "New host $HOST - create key (yes/no)? " 1>&2 + echo -n "New user/host pair $USER@$HOST - create key (yes/no)? " 1>&2 read answer done if [ "$answer" = "no" ]; then @@ -115,7 +115,22 @@ fi BASENAME=`basename $0` if [ "$BASENAME" = "scpsh" ]; then - exec $SHELL -i + # Print information if we are running entirely interactive (or + # somebody is attempting to make us believe we are) + if [ -t 0 -a -t 1 -a -t 2 ]; then + echo ">>>" 1>&2 + echo ">>> Starting up shell with authentication variables." 1>&2 + echo ">>> You can now scp to $USER@$HOST without passwords." 1>&2 + if [ "$TGT" = "" ]; then + echo ">>> $USER@$HOST is available through the shorthand \$TGT" 1>&2 + fi + echo ">>>" 1>&2 + fi + if [ "$TGT" = "" ]; then + TGT=$USER@$HOST + export TGT + fi + exec $SHELL elif [ "$BASENAME" = "safeshinstall" ]; then cat $HOSTDIR/id_dsa.pub | ssh $USER@$HOST 'mkdir -p .ssh && cat >> .ssh/authorized_keys2' elif [ "$1" = "" ]; then |