[TriLUG] Semi-OT: MOTD only in TELNET?

Brian Henning Brian.Henning at datadirect.com
Wed Jun 6 15:06:19 EDT 2007


Hi Gang,

I've been forced by the powers that be to enable telnet on any servers I
administer (I pretty much can't just put my foot down; I'm really a
support engineer [read: customer support] -- administering the machines
is sort of a task we all share within support).  So, begrudgingly, I've
opened the port and activated the xinetd config to accept telnet.  All
is working; no problems there.

What I'd like to do is have a MOTD that calmly suggests users switch to
SSH.  To the effect of "You're using telnet.  Though telnet is enabled
on this server, we encourage you to consider switching to SSH, because
it is better."  So what I want to happen is that message be displayed at
logon, but only if the user is connecting via telnet.  I don't want it
to be displayed if the user is connecting via ssh.

/etc/motd is used by logon, and would be displayed any time logon
creates a shell for a user, whether telnet or ssh or local, so that's
right out.  Does anyone know of a way to get a MOTD to display only for
a particular kind of connection?  Maybe a way to set up a login script
that only runs when it's a telnet connection?

Thanks,
~Brian

----------------
Brian A. Henning
   DataDirect
Support Engineer
  888-332-6797
---------------- 




More information about the TriLUG mailing list