From: Florian Weimer Date: Thu, 22 May 2008 13:38:31 +0000 (+0200) Subject: Redirect stderr when calling ssh-keyscan X-Git-Tag: v0.9.4~5 X-Git-Url: https://repo.or.cz/w/dowkd.git/commitdiff_plain/68bc72135699fe0fc827dc3c503af2196dcd9e14 Redirect stderr when calling ssh-keyscan This suppresses a few annoying error messages. --- diff --git a/dowkd.in b/dowkd.in index c0bd7bd..59c8f50 100644 --- a/dowkd.in +++ b/dowkd.in @@ -429,15 +429,15 @@ sub from_ssh_host ($@) { @addrs > 0; } @names; - my @lines= safe_backtick qw/ssh-keyscan -t/, 'rsa1,rsa,dsa', '-p', - $port, @names; + my @lines= safe_backtick_stderr qw/ssh-keyscan -t/, 'rsa1,rsa,dsa', + '-p', $port, @names; my $tmp = new File::Temp; for my $line (@lines) { - next if $line =~ /^#/; + next if $line =~ /^(?:#|no hostkey alg)/; my ($host, $data) = $line =~ /^(\S+) (.*)$/; - from_ssh_auth_line $tmp, $host, $data - or die "$host: warning: unparsable line\n"; + $host && from_ssh_auth_line $tmp, $host, $data + or die "$host: warning: unparsable line: $line"; } }