Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

motd being printed only on debian squeeze boxes #87

Open
GoogleCodeExporter opened this issue Mar 10, 2016 · 4 comments
Open

motd being printed only on debian squeeze boxes #87

GoogleCodeExporter opened this issue Mar 10, 2016 · 4 comments

Comments

@GoogleCodeExporter
Copy link

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

Original issue reported on code.google.com by jon...@gmail.com on 2 Jul 2013 at 8:13

@GoogleCodeExporter
Copy link
Author

Have same issue on AIX box running openssh with latest pssh: pssh-2.3-1

[root@host:] pssh -H server -t 10 -i "uptime"
[1] 09:46:49 [SUCCESS] server
  09:46AM   up 29 days,  14:34,  2 users,  load average: 0.38, 0.41, 0.45


[root@host:] pssh -H server -t 10 --inline-stdout -I         
uptime
[1] 09:47:27 [SUCCESS] server
****************************************************************************
*       Welcome to AIX version 6.1!                        *
****************************************************************************
[YOU HAVE NEW MAIL]
  09:47AM   up 29 days,  14:35,  2 users,  load average: 0.54, 0.46, 0.46




Original comment by mazh...@gmail.com on 18 Jul 2013 at 7:51

@GoogleCodeExporter
Copy link
Author

The motd is probably caused by something in the /etc/ssh/sshd_config file. 
That's my guess, anyway. I'm sure that pssh isn't creating it, so it's 
definitely something in ssh.

Original comment by amcna...@gmail.com on 18 Jul 2013 at 4:45

@GoogleCodeExporter
Copy link
Author

Thanks for the answer, you are right the PrintMotd option is the problem.
On the current environment I am unable to disable that. 

Is there any possibility to create a option that would create a .hushlogin file 
before the interactive connection? 

I don't want to create a .hushlogin file permanently just for a run of some 
scripts / checks. 

E.g. 

pssh -I --hush would first run in -i checking if there is a ~/.hushlogin and 
generating ~/.hushlogin file if not (preferably with some note that it was done 
from pssh) after that it would run in the -I option, on the end it would go 
again to -i and removing the ~/.hushlogin files that it generated. 


Original comment by mazh...@gmail.com on 19 Jul 2013 at 8:36

@GoogleCodeExporter
Copy link
Author

I think that's really outside the scope of what pssh can or should do.

One other idea you might try is to add the following options to pssh: -x "-T"

This will make pssh pass the "-T" option to ssh, which might possibly help 
(though I'm really not sure).

Original comment by amcna...@gmail.com on 19 Jul 2013 at 4:26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant