Better warning message for multi-keys per pubkey file

"WARNING: a pubkey file can only have one line (key); ignoring $pubkey"
message was a bit confusing, because elsewhere the docs claim multiple
keys are suported.  Added note on how to add multiple keys for single
user and pointer to the doc file concerned.
This commit is contained in:
Paweł Zuzelski 2010-06-24 12:03:58 +02:00 committed by Sitaram Chamarty
parent c1eeaf3c2c
commit 1315b1ad11

View file

@ -607,7 +607,10 @@ for my $pubkey (`find . -type f`)
# don't trust files with multiple lines (i.e., something after a newline)
if ($pubkey_content =~ /\n./)
{
print STDERR "WARNING: a pubkey file can only have one line (key); ignoring $pubkey\n";
print STDERR "WARNING: a pubkey file can only have one line (key); ignoring $pubkey\n" .
" If you want to add multiple public keys for a single user, use\n" .
" \"user\@host.pub\" file names. See the \"one user, many keys\"\n" .
" section in doc/3-faq-tips-etc.mkd for details.\n";
next;
}
print $newkeys_fh "command=\"$AUTH_COMMAND $user\",$AUTH_OPTIONS ";