#!/bin/sh # this is the command a user is forced to run when connecting via SSH; # the mechanism of enforcement is an authorized_keys2 file option if [ "$1" = "" ]; then echo "This script must be run with an argument saying which user is " echo "accessing the repository." exit 0 fi # log the connection # date: will format a string with some expanded date components # %s: unix time (seconds since epoch) (GNU 'date' extension) # %c: human-readable date/time # $SSH_CLIENT: ipaddr srcport destport date +"$1 %s (%c) $SSH_CLIENT" >> $HOME/cvsguest-ssh.log # hand off to 'cvs server', using my modified version that allows me # to supply the username # # +----------------------------------------------------------------+ # | NOTE: You probably need to edit the path to the 'cvs' command. | # +----------------------------------------------------------------+ # exec /opt/cvs-1.11.18-sm/bin/cvs -u "$1" server # # ^^^^^^^^^^^^^^^^^^^ edit this