summaryrefslogtreecommitdiff
path: root/security/safesh/src/safesh.sh
diff options
context:
space:
mode:
authorEivind Eklund <eivind@FreeBSD.org>2002-10-31 21:11:07 +0000
committerEivind Eklund <eivind@FreeBSD.org>2002-10-31 21:11:07 +0000
commitadc23812ca05338d73b0362090599be5315a8581 (patch)
treec6a3aa77f22badf11e6f5e431d94cbae96a39c0a /security/safesh/src/safesh.sh
parentUpgrade to 0.5.4. (diff)
Upgrade to V1.4.
This includes a series of usability fixes, including making safesh easy to use with CVS, with scp, and to make installation on other hosts trivial.
Notes
Notes: svn path=/head/; revision=69213
Diffstat (limited to '')
-rw-r--r--security/safesh/src/safesh.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/security/safesh/src/safesh.sh b/security/safesh/src/safesh.sh
index 1774e594e0a8..194ed20a4ddd 100644
--- a/security/safesh/src/safesh.sh
+++ b/security/safesh/src/safesh.sh
@@ -38,6 +38,13 @@ 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
+ read answer
+ done
+ if [ "$answer" = "no" ]; then
+ exit 1
+ fi
mkdir -p $HOSTDIR || myx "$0: Unable to create $HOSTDIR"
fi
@@ -106,7 +113,12 @@ if [ "${KEYLIST}" != "" ]; then
fi
fi
-if [ "$1" = "" ]; then
+BASENAME=`basename $0`
+if [ "$BASENAME" = "scpsh" ]; then
+ exec $SHELL -i
+elif [ "$BASENAME" = "safeshinstall" ]; then
+ cat $HOSTDIR/id_dsa.pub | ssh $USER@$HOST 'mkdir -p .ssh && cat >> .ssh/authorized_keys2'
+elif [ "$1" = "" ]; then
exec ssh -A $USER@$HOST
else
exec ssh "$@"