Page 1 of 1

"Updates are available" MOTD on SSH

Posted: Thu Aug 02, 2012 7:09 am
by benjaminsherwood
Hi

I've spent since yesterday morning looking for an answer to this all over the internet, but have had to admit defeat. I don't know if I'm just phrasing my queries wrong or what, but... Anyway.

I have, at home, a Mint box and a Debian box. I'd noticed, as I've been using an SSH connection to tunnel my browsing at work out of my home connection via the Mint box, that when I SSH on, the server displays some kind of MOTD (not sure if it's PAM handling it or what?) that includes some information about available updates / security updates / upgrades. You'll probably all have seen this - I assume it's the default behaviour for Mint.

Now, I like that feature when logging in - it helps me remember to run check for updates each day. I thought it'd be a reasonably easy thing to configure it to work on my Debian box when I logged on there over SSH. I've looked at apt-get and aptitude, to see if there's anything built in there (the closest I got was considering that I could do:

Code: Select all

aptitude search "~U" | wc -l
which will give me the number of matched installed and upgradable packages - but it's certainly not as clean as the listing that's provided by Mint on login (which, by the way, looks suspiciously like a line out of "apt-get upgrade" anyways ("4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.", for example).


I hope this query makes sense... There must be a sensible way of achieving want I want here. Does anyone know how Mint currently does it? As I can't imagine it'd be that hard to implement Mint's process, to Debian.


I'm still relatively new to Linux so, be gentle? :)

Re: "Updates are available" MOTD on SSH

Posted: Thu Aug 02, 2012 10:12 am
by xenopeek
Moving this here, as I think one of the regulars in this section would be able to share some thoughts on this.

Re: "Updates are available" MOTD on SSH

Posted: Thu Aug 02, 2012 10:29 am
by benjaminsherwood
Fair enough :) thought I best just go with the newbies section as I've not been using Linux for much, for too long.

This is the first thing that's really got me stumped, though... Fingers crossed someone will have some insight!

Re: "Updates are available" MOTD on SSH

Posted: Mon Aug 06, 2012 6:58 am
by benjaminsherwood
Wow, no-one at all has any clue on this?

Surprises me, I didn't really think it was such a difficult question, but, not being able to find an answer anywhere on Google should probably have indicated that was the case.

Shame that no-one seems to know how it works on Mint at the moment... Might have to vanilla a mint install on to a VM and see if I can figure it out.

Re: "Updates are available" MOTD on SSH

Posted: Tue Aug 07, 2012 1:00 am
by Jamesc359
Strangely enough I don't have this on my system. So this is a shot in the dark, but have you looked at /etc/profile, /etc/bash.bashrc, ~/.bashrc, ~/.bash_profile, ~/.bash_login ?

Re: "Updates are available" MOTD on SSH

Posted: Fri Sep 07, 2012 1:40 pm
by thenewguy
I think what the original poster is looking for is the script located at /usr/lib/update-notifier/apt-check

If you open your bashrc file ~/.bashrc and add the following line...

Code: Select all

/usr/lib/update-notifier/apt-check --human-readable
That should do the tricl