';
echo ' | ';
echo ''.substr($c['location'],0,1).' | ';
echo ' | ';
echo '#'.$c['serial'].' | ';
echo ''.$c['hostname'].' | ';
echo ''.$c['ip'].' | ';
if($c['online'])
{
if($showversion=='on')
{
$pubkey = mysql_query('select public_key from ssh_auth_clients where serial='.$c['serial'].'');
while ($row = mysql_fetch_row ($pubkey)) {
$sshcmd = "/usr/bin/ssh";
$home = "/home/httpd";
# schreiben der .ssh/known_hosts file mit dem public rsa key des client,
# um die "yes" abfrage zu vermeiden
$hostfile = fopen ($home."/.ssh/known_hosts","w");
fwrite($hostfile,$c['ip']." ".$row[0],strlen($row[0])+strlen($c['ip'])+1);
fclose($hostfile);
$osver = exec($sshcmd.' -l root '.$c['ip'].' \'os_ver=$('.$osver[0].'';
echo ''.$osver[1].' | ';
}
}
echo '';
if($c['online'])
{
echo '';
echo '';
}
else echo '';
echo ' | ';
echo '
';
}
echo '