Sample Header Ad - 728x90

script in /etc/update-motd.d/ not working

1 vote
2 answers
345 views
I have created a script /etc/update-motd.d/foo #!/bin/sh echo aaa exit 0 I would like this script to be executed on ssh login, and display the output. I have the folowing lines in my /etc/pam.d/sshd: session optional pam_motd.so motd=/run/motd.dynamic session optional pam_motd.so noupdate which I expected should execute that script on ssh login. But that does not work, and nothing is printed on ssh login. The script is owned by root and has 755 permissions. What else do I need to do? I am using Debian 10.
Asked by Martin Vegter (598 rep)
Dec 20, 2022, 06:34 AM
Last activity: Dec 21, 2022, 09:05 AM