summaryrefslogtreecommitdiff
path: root/regress/usr.bin/ssh/test-exec.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/usr.bin/ssh/test-exec.sh')
-rw-r--r--regress/usr.bin/ssh/test-exec.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh
index 4c7c6e65765..7d6ac718116 100644
--- a/regress/usr.bin/ssh/test-exec.sh
+++ b/regress/usr.bin/ssh/test-exec.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: test-exec.sh,v 1.37 2010/02/24 06:21:56 djm Exp $
+# $OpenBSD: test-exec.sh,v 1.38 2013/03/23 11:09:43 dtucker Exp $
# Placed in the Public Domain.
USER=`id -un`
@@ -223,9 +223,11 @@ rm -f $OBJ/known_hosts $OBJ/authorized_keys_$USER
trace "generate keys"
for t in rsa rsa1; do
# generate user key
- rm -f $OBJ/$t
- ${SSHKEYGEN} -q -N '' -t $t -f $OBJ/$t ||\
- fail "ssh-keygen for $t failed"
+ if [ ! -f $OBJ/$t ] || [ ${SSHKEYGEN} -nt $OBJ/$t ]; then
+ rm -f $OBJ/$t
+ ${SSHKEYGEN} -q -N '' -t $t -f $OBJ/$t ||\
+ fail "ssh-keygen for $t failed"
+ fi
# known hosts file for client
(