From e7b271370129b949affde942e16dd4278a8ec009 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 14 Dec 2006 05:01:07 +0000 Subject: [PATCH] More polishing. --- sshauth | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sshauth b/sshauth index 5a81907..5ec41a4 100755 --- a/sshauth +++ b/sshauth @@ -107,7 +107,7 @@ echo "I see the following public keys: $public_keys" set -- `echo $public_keys | sed -e '/.pub$/s///g'` for private_key in $* do - legend="'${private_key}' corresponding to '${private_key}.pub'" + legend="Private '${private_key}' corresponding to '${private_key}.pub'" if [ -r $private_key ] then echo "$legend exists and is readable." @@ -129,6 +129,8 @@ fi agent=" #!/bin/bash # Agent script generated by sshauth. +TERM=dumb # This magic prevents some classes of problems +export TERM # if you have a shell profile on the remote machine. checkonly=$check @@ -165,7 +167,7 @@ then fi fixperms .ssh -if [ -x .ssh/authorized_keys ] +if [ -f .ssh/authorized_keys ] then echo \"Remote authorized_keys file will not be overwritten.\" echo \"To remove it, do 'sshauth -d ${user}@${host}'.\" @@ -173,12 +175,14 @@ then elif [ \$checkonly = 'yes' ] then echo \"Remote .ssh exists, authorized_keys could be installed.\" + exit 0 else echo \"Creating remote .ssh/authorized_keys file...\" cat >.ssh/authorized_keys <