motd being printed only on debian squeeze boxes

77 views
Skip to first unread message

Jonathan Nicol

unread,
Mar 27, 2013, 8:25:19 PM3/27/13
to parall...@googlegroups.com
Hi all, having a little trouble with output...

Using pssh with the -I option to read commands from stdin. Only on Debian Squeeze hosts, the motd is (undesirably) included in the output. Not so for Debian Etch hosts (and any other OS I've tried)


$ echo "hostname" | pssh --inline-stdout -t 60 -H root@server1 -H root@server2 -I
[1] 17:18:24 [SUCCESS] root@server1
Hardware => Physical (X9SCL/X9SCM) (CPU: 8, MEM: 15.62 GB)
OS       => Debian GNU/Linux 6.0.6 (squeeze) (Kernel: 3.2.2-hw2)
server1
[2] 17:18:25 [SUCCESS] root@server2
server2


Doesn't happen without -I  (and I assure you server2 does have a motd)


$ pssh --inline-stdout -t 60 -H root@server1 -H root@server2 "hostname"
[1] 17:18:48 [SUCCESS] root@server1
server1
[2] 17:18:48 [SUCCESS] root@server2
server2


Any suggestions/workarounds? Should I file a bug report? I have no idea what's different about Squeeze, but I've reproduced this on several hosts.

thanks,
Jonathan

Pavol Bednar

unread,
Jul 18, 2013, 3:44:54 AM7/18/13
to parall...@googlegroups.com
I can confirm same behavior on AIX boxes using openssh. 

Would be nice to have a option to omit this. 

Andrew McNabb

unread,
Jul 18, 2013, 12:47:00 PM7/18/13
to parall...@googlegroups.com
Have you looked at the PrintMotd option in /etc/ssh/sshd_config on the
server. I'm pretty sure that this is something in ssh rather than in
pssh.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "parallel-ssh" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to parallel-ssh...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868

Jonathan Nicol

unread,
Nov 6, 2013, 9:24:56 PM11/6/13
to parall...@googlegroups.com
I've figured this out... Starting with Debian 6, the MOTD is controlled by a PAM module, not ssh, so the sshd options are useless. Unfortunately said module seems to print to stdout rather than stderr. The workaround is supplying a shell command (sh/bash/etc) *in addition* to the -I stdin, like so:
pssh -I --inline-stdout -h hostlist bash < pssh_execute_me

HTH someone else :)
Jonathan

Andrew McNabb

unread,
Nov 6, 2013, 11:33:40 PM11/6/13
to parall...@googlegroups.com
On Wed, Nov 06, 2013 at 06:24:56PM -0800, Jonathan Nicol wrote:
> I've figured this out... Starting with Debian 6, the MOTD is controlled by
> a PAM module, not ssh, so the sshd options are useless. Unfortunately said
> module seems to print to stdout rather than stderr. The workaround is
> supplying a shell command (sh/bash/etc) *in addition* to the -I stdin, like
> so:
> pssh -I --inline-stdout -h hostlist bash < pssh_execute_me

Thanks for tracking this down and sharing with everyone.
Reply all
Reply to author
Forward
0 new messages