Update-motd.d does not update on ssh login











up vote
2
down vote

favorite












This following message shows up whenever I login via ssh.



  System load:  0.23               Processes:           163
Usage of /: 24.1% of 58.39GB Users logged in: 0
Memory usage: 27% IP address for eth0: 192.168.100.82
Swap usage: 0%
* MicroK8s is Kubernetes in a snap. Made by devs for devs.
One quick install on a workstation, VM, or appliance.
Current zen blocks are synced at
Last login: Wed Dec 5 09:52:41 2018 from 192.168.100.71


I added some script at /etc/update-motd.d/ to add some more message that I need it show whenever there is an ssh login.



When I run run-parts /etc/update-motd.d/ it works fine like following output:



+ printf Current zen blocks are synced at "blocks": 424076,



But when I exit and login again the message does not show up. Output below:



Current zen blocks are synced at



here is what I have added



#!/bin/sh
set -x
printf "Current zen blocks are synced at $(/usr/bin/zen-cli getinfo | grep blocks)"









share|improve this question
























  • Where is it supposed to show up?
    – George Udosen
    Dec 5 at 10:11










  • When i login via ssh
    – Rakib Fiha
    Dec 5 at 10:12










  • Where, terminal, file etc???
    – George Udosen
    Dec 5 at 10:15










  • My apologies for being bad at explaining, so all I want is show the output in terminal to this command: zen-cli getinfo | grep blocks whenever someone logs in via ssh
    – Rakib Fiha
    Dec 5 at 10:19

















up vote
2
down vote

favorite












This following message shows up whenever I login via ssh.



  System load:  0.23               Processes:           163
Usage of /: 24.1% of 58.39GB Users logged in: 0
Memory usage: 27% IP address for eth0: 192.168.100.82
Swap usage: 0%
* MicroK8s is Kubernetes in a snap. Made by devs for devs.
One quick install on a workstation, VM, or appliance.
Current zen blocks are synced at
Last login: Wed Dec 5 09:52:41 2018 from 192.168.100.71


I added some script at /etc/update-motd.d/ to add some more message that I need it show whenever there is an ssh login.



When I run run-parts /etc/update-motd.d/ it works fine like following output:



+ printf Current zen blocks are synced at "blocks": 424076,



But when I exit and login again the message does not show up. Output below:



Current zen blocks are synced at



here is what I have added



#!/bin/sh
set -x
printf "Current zen blocks are synced at $(/usr/bin/zen-cli getinfo | grep blocks)"









share|improve this question
























  • Where is it supposed to show up?
    – George Udosen
    Dec 5 at 10:11










  • When i login via ssh
    – Rakib Fiha
    Dec 5 at 10:12










  • Where, terminal, file etc???
    – George Udosen
    Dec 5 at 10:15










  • My apologies for being bad at explaining, so all I want is show the output in terminal to this command: zen-cli getinfo | grep blocks whenever someone logs in via ssh
    – Rakib Fiha
    Dec 5 at 10:19















up vote
2
down vote

favorite









up vote
2
down vote

favorite











This following message shows up whenever I login via ssh.



  System load:  0.23               Processes:           163
Usage of /: 24.1% of 58.39GB Users logged in: 0
Memory usage: 27% IP address for eth0: 192.168.100.82
Swap usage: 0%
* MicroK8s is Kubernetes in a snap. Made by devs for devs.
One quick install on a workstation, VM, or appliance.
Current zen blocks are synced at
Last login: Wed Dec 5 09:52:41 2018 from 192.168.100.71


I added some script at /etc/update-motd.d/ to add some more message that I need it show whenever there is an ssh login.



When I run run-parts /etc/update-motd.d/ it works fine like following output:



+ printf Current zen blocks are synced at "blocks": 424076,



But when I exit and login again the message does not show up. Output below:



Current zen blocks are synced at



here is what I have added



#!/bin/sh
set -x
printf "Current zen blocks are synced at $(/usr/bin/zen-cli getinfo | grep blocks)"









share|improve this question















This following message shows up whenever I login via ssh.



  System load:  0.23               Processes:           163
Usage of /: 24.1% of 58.39GB Users logged in: 0
Memory usage: 27% IP address for eth0: 192.168.100.82
Swap usage: 0%
* MicroK8s is Kubernetes in a snap. Made by devs for devs.
One quick install on a workstation, VM, or appliance.
Current zen blocks are synced at
Last login: Wed Dec 5 09:52:41 2018 from 192.168.100.71


I added some script at /etc/update-motd.d/ to add some more message that I need it show whenever there is an ssh login.



When I run run-parts /etc/update-motd.d/ it works fine like following output:



+ printf Current zen blocks are synced at "blocks": 424076,



But when I exit and login again the message does not show up. Output below:



Current zen blocks are synced at



here is what I have added



#!/bin/sh
set -x
printf "Current zen blocks are synced at $(/usr/bin/zen-cli getinfo | grep blocks)"






command-line ssh motd banner






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 5 at 10:24

























asked Dec 5 at 10:09









Rakib Fiha

113




113












  • Where is it supposed to show up?
    – George Udosen
    Dec 5 at 10:11










  • When i login via ssh
    – Rakib Fiha
    Dec 5 at 10:12










  • Where, terminal, file etc???
    – George Udosen
    Dec 5 at 10:15










  • My apologies for being bad at explaining, so all I want is show the output in terminal to this command: zen-cli getinfo | grep blocks whenever someone logs in via ssh
    – Rakib Fiha
    Dec 5 at 10:19




















  • Where is it supposed to show up?
    – George Udosen
    Dec 5 at 10:11










  • When i login via ssh
    – Rakib Fiha
    Dec 5 at 10:12










  • Where, terminal, file etc???
    – George Udosen
    Dec 5 at 10:15










  • My apologies for being bad at explaining, so all I want is show the output in terminal to this command: zen-cli getinfo | grep blocks whenever someone logs in via ssh
    – Rakib Fiha
    Dec 5 at 10:19


















Where is it supposed to show up?
– George Udosen
Dec 5 at 10:11




Where is it supposed to show up?
– George Udosen
Dec 5 at 10:11












When i login via ssh
– Rakib Fiha
Dec 5 at 10:12




When i login via ssh
– Rakib Fiha
Dec 5 at 10:12












Where, terminal, file etc???
– George Udosen
Dec 5 at 10:15




Where, terminal, file etc???
– George Udosen
Dec 5 at 10:15












My apologies for being bad at explaining, so all I want is show the output in terminal to this command: zen-cli getinfo | grep blocks whenever someone logs in via ssh
– Rakib Fiha
Dec 5 at 10:19






My apologies for being bad at explaining, so all I want is show the output in terminal to this command: zen-cli getinfo | grep blocks whenever someone logs in via ssh
– Rakib Fiha
Dec 5 at 10:19

















active

oldest

votes











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: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
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%2f1098597%2fupdate-motd-d-does-not-update-on-ssh-login%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1098597%2fupdate-motd-d-does-not-update-on-ssh-login%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕