Motd and ssh last login

Actually I have this:

Code:
Last login: Mon Sep 26 17:31:20 2011 from e4600.home

FreeBSD 8.2-RELEASE (GENERIC) #0: Fri Feb 18 02:24:46 UTC 2011

etc ...

I want line: Last login, ect ..., appear after motd (FreeBSD 8.2-RELEASE etc ...).
 
I think, you need check your config
/etc/ssh/sshd_config
and set
Code:
PrintLastLog yes

and kill -HUP sshd-process' id.
 
I already do this, it's work but the last login line appear before the motd.
I have debian to and the last login line appear after motd.

debian :

Code:
Linux biche.home 2.6.18-028stab092.1 #1 SMP Wed Jul 20 19:47:12 MSD 2011 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Sep 26 23:28:34 2011 from e4600.home

FreeBSD:

Code:
Last login: Mon Sep 26 17:31:20 2011 from e4600.home

FreeBSD 8.2-RELEASE (GENERIC) #0: Fri Feb 18 02:24:46 UTC 2011

etc ...

I want same as debian.
 
You will need to modify the source of login(1) for that. Or you can create ~/.hushlogin to suppress all its messages, and then implement what you want in your shell's startup file instead.
 
Try disabling PrintMotd in the sshd_config, and then having it be displayed via pam.

Code:
session   optional   pam_motd.so

Kind regards,
-Craig
 
Back
Top