might be slightly different on your system, i use Suse (opensuse and SLES).
look in file etc/ssh/sshd_config
for #Banner
uncomment it and do something like "Banner /etc/ssh_banner.txt"
where /etc/ssh_banner.txt is what you want displayed as a banner.
for executing script after logon,
in suse at the end of the /etc/bash.bashrc file which gets executed during logon there is
Code:
# And now let us see if there is e.g. a local bash.bashrc
# (for options defined by your sysadmin, not SuSE Linux)
#
case "$is" in
bash) test -s /etc/bash.bashrc.local && . /etc/bash.bashrc.local ;;
ksh) test -s /etc/ksh.kshrc.local && . /etc/ksh.kshrc.local ;;
zsh) test -s /etc/zsh.zshrc.local && . /etc/zsh.zshrc.local ;;
ash) test -s /etc/ash.ashrc.local && . /etc/ash.ashrc.local
esac
test -s /etc/sh.shrc.local && . /etc/sh.shrc.local
in /etc/bash.basrc.local and csh.cshrc.local is where i had all my admin stuff, in one spot.
I would put a call to whatever you want to happen in there.
one thing i always hated and never found out, is what the chronological process is when you log on to linux and whether distributions differ. after your password is accepted, then I know files like /etc/bash.bashrc and /etc/profile are sourced, and further things get run like if remote desktop and graphics like gdm and xdm are kicked off. But i would love to know that process in detail.