diff options
author | Eivind Eklund <eivind@FreeBSD.org> | 2002-10-31 21:11:07 +0000 |
---|---|---|
committer | Eivind Eklund <eivind@FreeBSD.org> | 2002-10-31 21:11:07 +0000 |
commit | adc23812ca05338d73b0362090599be5315a8581 (patch) | |
tree | c6a3aa77f22badf11e6f5e431d94cbae96a39c0a /security/safesh/src/safesh.sh | |
parent | bc820dd0a398e0c76ec1b57eed9d0a1dea616bbb (diff) | |
download | ports-adc23812ca05338d73b0362090599be5315a8581.tar.gz ports-adc23812ca05338d73b0362090599be5315a8581.zip |
Notes
Diffstat (limited to 'security/safesh/src/safesh.sh')
-rw-r--r-- | security/safesh/src/safesh.sh | 14 |
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 "$@" |