[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Scriptable motd for initial SSH login?
- Subject: [ale] Scriptable motd for initial SSH login?
- From: cfowler at outpostsentinel.com (Chris Fowler)
- Date: Wed, 14 Sep 2011 14:26:16 -0400
- In-reply-to: <CAAt=rgCH8iywEL2+52NLhDj4gvraZQbGmHJPJv-Zhu82r5RLaw@mail.gmail.com>
- References: <CAAt=rgCH8iywEL2+52NLhDj4gvraZQbGmHJPJv-Zhu82r5RLaw@mail.gmail.com>
On Wed, 2011-09-14 at 14:02 -0400, James Sumners wrote:
> I asked the question at [1], but have not had any decent answers. I
> want to setup a "motd" for a specific user such that when that user
> logs in via SSH, the motd is executed and displayed. The script should
> _only_ run when the user logs in via SSH and not via a subsequent
> login. That is, if the user starts `screen` after logging in, the motd
> should not be shown for that screen instance, nor any subsequent
> screens.
>
> Any suggestions?
>
> [1] -- http://serverfault.com/questions/310596/custom-motd-for-a-specific-user-after-logging-in-via-ssh
>
I don't think there is a solution unless you want to do some code.
you could modify pam_motd for SSH only operation and then have it read
from a file in /etc/motds/*