Things were clearly not matched up right. Substituting
elif for both
elses would clearly not be right either, as well as
elif requires a condition to test.
I haven't really figured out what you are trying to do, but making another wild stab at it, is the following what you were trying to do?
Code:
if [ -f $DECRYPT ]; then
if [ $1 = "venus" ]; then
ssh -p 23000 me@venus
else
grep -i $1 passwd.txt
ssh -i ssh_key admin@$1
fi
else
echo "no decrypted passwd file found"
gpg -d passwd.txt.gpg > passwd.txt
grep -i $1 passwd.txt
ssh -i ssh_key admin@$1
fi