How to setup Logrep client on Windows NT/2000 ?
Requirements
- A user account (xferuser for example).
- OpenSSH for Windows server is installed.
- Perl and unix utilities tail, cat and gzip are available via standard PATH.
- Eventlog export utility DUMPEL from Microsoft is available.
- Public key part of a key pair for public key authentication.
Procedure
Default $HOME = "c:\program files\networksimplicity\ssh"
- Make directory c:\prog\logrep and $HOME\logrep
- Go to $HOME directory.
- Run mkpasswd -l -u xferuser >> ..\etc\passwd
- Run mkgroup -l >> ..\etc\group
- Fix the ..\etc\passwd file : Change UID for xferuser to 500.
- Copy public key to $HOME\.ssh directory and rename it as authorized_keys.
- Copy logrep.client.win to c:\prog\logrep directory.
- Set up a schedule task by using logrep.client.win
Logrep.client example (for use as scheduled tasks)
iis
$PERLDIR\perl.exe c:\prog\logrep\logrep.client.win -s iis -p c:\winnt\system32\logfiles\w3svc1 -n 0 -u xferuser
copies today's IIS logfile (exYYMMDD.log) from c:\winnt\system32\logfiles\w3svc1 to $HOME\logrep directory and gzips it.
NT Event log
$PERLDIR\perl.exe c:\prog\logrep\logrep.client.win -s ntevent -p system -n 2500 -u xferuser
Copies last 2500 lines from NT System Eventlog to $HOME\logrep directory and gzips it.