How do I edit the ssh motd?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
20
down vote

favorite
7












I would like to add some fields to the ssh MOTD.



MOTD today:



Linux toker 2.6.31-22-generic-pae #69-Ubuntu SMP Wed Nov 24 09:04:58 UTC 2010 i686

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/

System information as of Tue Jan 25 19:25:53 CET 2011

System load: 0.23 Processes: 139
Usage of /: 76.8% of 911.20GB Users logged in: 1
Memory usage: 17% IP address for eth0: 192.168.1.102
Swap usage: 0%

Graph this data and manage this system at https://landscape.canonical.com/

38 packages can be updated.
38 updates are security updates.

No mail.
Last login: Tue Jan 25 19:22:06 2011 from 192.168.1.106


I know that I could change this to a static message by pointing /etc/motd to something else than /var/run/motd but I do not want to loose the generated data that is presented today.



Is it possible to add the disk usage off two additional hard drives to the message that is generated by default? For example:



Linux toker 2.6.31-22-generic-pae #69-Ubuntu SMP Wed Nov 24 09:04:58 UTC 2010 i686

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/

System information as of Tue Jan 25 19:25:53 CET 2011

System load: 0.23 Processes: 139
Memory usage: 17% Users logged in: 1
Swap usage: 0% IP address for eth0: 192.168.1.102

Usage of /: 76.8% of 911.20GB
Usage of /media/hddb/: 8% of 1.8T
Usage of /media/hddc/: 16% of 1.8T

Graph this data and manage this system at https://landscape.canonical.com/

38 packages can be updated.
38 updates are security updates.

No mail.
Last login: Tue Jan 25 19:22:06 2011 from 192.168.1.105






share|improve this question


























    up vote
    20
    down vote

    favorite
    7












    I would like to add some fields to the ssh MOTD.



    MOTD today:



    Linux toker 2.6.31-22-generic-pae #69-Ubuntu SMP Wed Nov 24 09:04:58 UTC 2010 i686

    To access official Ubuntu documentation, please visit:
    http://help.ubuntu.com/

    System information as of Tue Jan 25 19:25:53 CET 2011

    System load: 0.23 Processes: 139
    Usage of /: 76.8% of 911.20GB Users logged in: 1
    Memory usage: 17% IP address for eth0: 192.168.1.102
    Swap usage: 0%

    Graph this data and manage this system at https://landscape.canonical.com/

    38 packages can be updated.
    38 updates are security updates.

    No mail.
    Last login: Tue Jan 25 19:22:06 2011 from 192.168.1.106


    I know that I could change this to a static message by pointing /etc/motd to something else than /var/run/motd but I do not want to loose the generated data that is presented today.



    Is it possible to add the disk usage off two additional hard drives to the message that is generated by default? For example:



    Linux toker 2.6.31-22-generic-pae #69-Ubuntu SMP Wed Nov 24 09:04:58 UTC 2010 i686

    To access official Ubuntu documentation, please visit:
    http://help.ubuntu.com/

    System information as of Tue Jan 25 19:25:53 CET 2011

    System load: 0.23 Processes: 139
    Memory usage: 17% Users logged in: 1
    Swap usage: 0% IP address for eth0: 192.168.1.102

    Usage of /: 76.8% of 911.20GB
    Usage of /media/hddb/: 8% of 1.8T
    Usage of /media/hddc/: 16% of 1.8T

    Graph this data and manage this system at https://landscape.canonical.com/

    38 packages can be updated.
    38 updates are security updates.

    No mail.
    Last login: Tue Jan 25 19:22:06 2011 from 192.168.1.105






    share|improve this question
























      up vote
      20
      down vote

      favorite
      7









      up vote
      20
      down vote

      favorite
      7






      7





      I would like to add some fields to the ssh MOTD.



      MOTD today:



      Linux toker 2.6.31-22-generic-pae #69-Ubuntu SMP Wed Nov 24 09:04:58 UTC 2010 i686

      To access official Ubuntu documentation, please visit:
      http://help.ubuntu.com/

      System information as of Tue Jan 25 19:25:53 CET 2011

      System load: 0.23 Processes: 139
      Usage of /: 76.8% of 911.20GB Users logged in: 1
      Memory usage: 17% IP address for eth0: 192.168.1.102
      Swap usage: 0%

      Graph this data and manage this system at https://landscape.canonical.com/

      38 packages can be updated.
      38 updates are security updates.

      No mail.
      Last login: Tue Jan 25 19:22:06 2011 from 192.168.1.106


      I know that I could change this to a static message by pointing /etc/motd to something else than /var/run/motd but I do not want to loose the generated data that is presented today.



      Is it possible to add the disk usage off two additional hard drives to the message that is generated by default? For example:



      Linux toker 2.6.31-22-generic-pae #69-Ubuntu SMP Wed Nov 24 09:04:58 UTC 2010 i686

      To access official Ubuntu documentation, please visit:
      http://help.ubuntu.com/

      System information as of Tue Jan 25 19:25:53 CET 2011

      System load: 0.23 Processes: 139
      Memory usage: 17% Users logged in: 1
      Swap usage: 0% IP address for eth0: 192.168.1.102

      Usage of /: 76.8% of 911.20GB
      Usage of /media/hddb/: 8% of 1.8T
      Usage of /media/hddc/: 16% of 1.8T

      Graph this data and manage this system at https://landscape.canonical.com/

      38 packages can be updated.
      38 updates are security updates.

      No mail.
      Last login: Tue Jan 25 19:22:06 2011 from 192.168.1.105






      share|improve this question














      I would like to add some fields to the ssh MOTD.



      MOTD today:



      Linux toker 2.6.31-22-generic-pae #69-Ubuntu SMP Wed Nov 24 09:04:58 UTC 2010 i686

      To access official Ubuntu documentation, please visit:
      http://help.ubuntu.com/

      System information as of Tue Jan 25 19:25:53 CET 2011

      System load: 0.23 Processes: 139
      Usage of /: 76.8% of 911.20GB Users logged in: 1
      Memory usage: 17% IP address for eth0: 192.168.1.102
      Swap usage: 0%

      Graph this data and manage this system at https://landscape.canonical.com/

      38 packages can be updated.
      38 updates are security updates.

      No mail.
      Last login: Tue Jan 25 19:22:06 2011 from 192.168.1.106


      I know that I could change this to a static message by pointing /etc/motd to something else than /var/run/motd but I do not want to loose the generated data that is presented today.



      Is it possible to add the disk usage off two additional hard drives to the message that is generated by default? For example:



      Linux toker 2.6.31-22-generic-pae #69-Ubuntu SMP Wed Nov 24 09:04:58 UTC 2010 i686

      To access official Ubuntu documentation, please visit:
      http://help.ubuntu.com/

      System information as of Tue Jan 25 19:25:53 CET 2011

      System load: 0.23 Processes: 139
      Memory usage: 17% Users logged in: 1
      Swap usage: 0% IP address for eth0: 192.168.1.102

      Usage of /: 76.8% of 911.20GB
      Usage of /media/hddb/: 8% of 1.8T
      Usage of /media/hddc/: 16% of 1.8T

      Graph this data and manage this system at https://landscape.canonical.com/

      38 packages can be updated.
      38 updates are security updates.

      No mail.
      Last login: Tue Jan 25 19:22:06 2011 from 192.168.1.105








      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 25 '11 at 19:30









      Jorge Castro

      34.3k104421614




      34.3k104421614










      asked Jan 25 '11 at 19:05







      user9605



























          3 Answers
          3






          active

          oldest

          votes

















          up vote
          17
          down vote



          accepted










          Take a look at the Ubuntu Wiki article about the design of the update-motd application. This program is contained in the update-motd package and will help you to create a more dynamic MOTD.






          share|improve this answer


















          • 3




            This answer doesn't really address the question - it just points somewhere else. Can you pull some of the key details into your answer?
            – Duncan Jones
            Mar 20 at 7:52

















          up vote
          20
          down vote













          The files you need to edit live in /etc/update-motd.d.



          See the update-motd man page for details about how it works.



          My version of Ubuntu doesn't show the disk usage, so I'm not sure which script exactly you need to edit.






          share|improve this answer


















          • 1




            That looks like the Ubuntu-Server motd.
            – Broam
            Apr 18 '11 at 19:01

















          up vote
          4
          down vote













          You can't edit the Script without extra coding. The message you see is shown with a wrapper script which calls /usr/bin/landscape-sysinfo. The output you see is created by landscape-sysinfo






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f23246%2fhow-do-i-edit-the-ssh-motd%23new-answer', 'question_page');

            );

            Post as a guest





























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            17
            down vote



            accepted










            Take a look at the Ubuntu Wiki article about the design of the update-motd application. This program is contained in the update-motd package and will help you to create a more dynamic MOTD.






            share|improve this answer


















            • 3




              This answer doesn't really address the question - it just points somewhere else. Can you pull some of the key details into your answer?
              – Duncan Jones
              Mar 20 at 7:52














            up vote
            17
            down vote



            accepted










            Take a look at the Ubuntu Wiki article about the design of the update-motd application. This program is contained in the update-motd package and will help you to create a more dynamic MOTD.






            share|improve this answer


















            • 3




              This answer doesn't really address the question - it just points somewhere else. Can you pull some of the key details into your answer?
              – Duncan Jones
              Mar 20 at 7:52












            up vote
            17
            down vote



            accepted







            up vote
            17
            down vote



            accepted






            Take a look at the Ubuntu Wiki article about the design of the update-motd application. This program is contained in the update-motd package and will help you to create a more dynamic MOTD.






            share|improve this answer














            Take a look at the Ubuntu Wiki article about the design of the update-motd application. This program is contained in the update-motd package and will help you to create a more dynamic MOTD.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 8 '13 at 20:28









            0xF2

            2,32721945




            2,32721945










            answered Jan 25 '11 at 20:15









            Luciano Facchinelli

            620612




            620612







            • 3




              This answer doesn't really address the question - it just points somewhere else. Can you pull some of the key details into your answer?
              – Duncan Jones
              Mar 20 at 7:52












            • 3




              This answer doesn't really address the question - it just points somewhere else. Can you pull some of the key details into your answer?
              – Duncan Jones
              Mar 20 at 7:52







            3




            3




            This answer doesn't really address the question - it just points somewhere else. Can you pull some of the key details into your answer?
            – Duncan Jones
            Mar 20 at 7:52




            This answer doesn't really address the question - it just points somewhere else. Can you pull some of the key details into your answer?
            – Duncan Jones
            Mar 20 at 7:52












            up vote
            20
            down vote













            The files you need to edit live in /etc/update-motd.d.



            See the update-motd man page for details about how it works.



            My version of Ubuntu doesn't show the disk usage, so I'm not sure which script exactly you need to edit.






            share|improve this answer


















            • 1




              That looks like the Ubuntu-Server motd.
              – Broam
              Apr 18 '11 at 19:01














            up vote
            20
            down vote













            The files you need to edit live in /etc/update-motd.d.



            See the update-motd man page for details about how it works.



            My version of Ubuntu doesn't show the disk usage, so I'm not sure which script exactly you need to edit.






            share|improve this answer


















            • 1




              That looks like the Ubuntu-Server motd.
              – Broam
              Apr 18 '11 at 19:01












            up vote
            20
            down vote










            up vote
            20
            down vote









            The files you need to edit live in /etc/update-motd.d.



            See the update-motd man page for details about how it works.



            My version of Ubuntu doesn't show the disk usage, so I'm not sure which script exactly you need to edit.






            share|improve this answer














            The files you need to edit live in /etc/update-motd.d.



            See the update-motd man page for details about how it works.



            My version of Ubuntu doesn't show the disk usage, so I'm not sure which script exactly you need to edit.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 16 '17 at 15:35









            muru

            129k19270460




            129k19270460










            answered Jan 25 '11 at 20:20









            Mikel

            5,22012027




            5,22012027







            • 1




              That looks like the Ubuntu-Server motd.
              – Broam
              Apr 18 '11 at 19:01












            • 1




              That looks like the Ubuntu-Server motd.
              – Broam
              Apr 18 '11 at 19:01







            1




            1




            That looks like the Ubuntu-Server motd.
            – Broam
            Apr 18 '11 at 19:01




            That looks like the Ubuntu-Server motd.
            – Broam
            Apr 18 '11 at 19:01










            up vote
            4
            down vote













            You can't edit the Script without extra coding. The message you see is shown with a wrapper script which calls /usr/bin/landscape-sysinfo. The output you see is created by landscape-sysinfo






            share|improve this answer
























              up vote
              4
              down vote













              You can't edit the Script without extra coding. The message you see is shown with a wrapper script which calls /usr/bin/landscape-sysinfo. The output you see is created by landscape-sysinfo






              share|improve this answer






















                up vote
                4
                down vote










                up vote
                4
                down vote









                You can't edit the Script without extra coding. The message you see is shown with a wrapper script which calls /usr/bin/landscape-sysinfo. The output you see is created by landscape-sysinfo






                share|improve this answer












                You can't edit the Script without extra coding. The message you see is shown with a wrapper script which calls /usr/bin/landscape-sysinfo. The output you see is created by landscape-sysinfo







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 25 '12 at 2:16









                anonymous

                411




                411






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f23246%2fhow-do-i-edit-the-ssh-motd%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Trouble downloading packages list due to a “Hash sum mismatch” error

                    How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                    How do I move numbers in filenames, in a batch renaming operation?