OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: "generating new host key..."

From: Martin Pelikán (martin.pelikangmail.com)
Date: Tue Sep 07 2010 - 11:55:00 CDT


2010/9/7, TeXitoi <texitoi+newstexitoi.eu>:
> My proposition, avoiding function:
>
> ssh_keys=TOPRINT
>
> for key in rsa1 dsa rsa ecdsa; do
> if [ "$ssh_key" = TOPRINT ]; then
> echo -n "ssh-keygen: generating new host key:"
> ssh_key=PRINTED
> fi
> done
>
> if [ "$ssh_keys" = PRINTED ]; then
> echo
> fi

Sorry, but the efficiency's giving us hard time, doesn't it?
How about:
echo -n "generating: "
for ; do
...
done
echo

--
Martin Pelikan