diff options
author | Eivind Eklund <eivind@FreeBSD.org> | 2003-02-19 20:01:57 +0000 |
---|---|---|
committer | Eivind Eklund <eivind@FreeBSD.org> | 2003-02-19 20:01:57 +0000 |
commit | 4c1f9ea2390f0cb7f429b1a68bd2223565e7a100 (patch) | |
tree | 9c43afedaba686c09f15860538b5bbc9228982f5 | |
parent | 7ac496bbd41dfa8a6257f26f85c04cce0d431fc8 (diff) | |
download | ports-4c1f9ea2390f0cb7f429b1a68bd2223565e7a100.tar.gz ports-4c1f9ea2390f0cb7f429b1a68bd2223565e7a100.zip |
Notes
-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 32da5514e825..bc110262ef64 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 16ccfa71032a..e56e8116d7d1 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 194ed20a4ddd..3ea1c18d85e6 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 |