TECHZEN Zenoss User Community ARCHIVE  

Attaching to container without password

Subject: Attaching to container without password
Author: Devon Solomon
Posted: 2018-02-02 09:31

I'm trying to figure out if you can attach to a container without it prompting you for a password? We have a multi host environment and i would like to run a script inside the zenmodeler container but cant figure out how to get pass the password prompt. 

example of what i want to do.
serviced service attach zenmodeler su - zenoss
(ENTER PASSWORD)
zenmodeler run --path=/Server/SSH/AIX --collect=zenoss.cmd.df >> /home/zenoss/logs/unix-filesystem-modeler.log

The I could just schedule this script with cron 

Thoughts on how to do this?

------------------------------
Devon Solomon
------------------------------


Subject: RE: Attaching to container without password
Author: Jim R
Posted: 2018-02-02 09:54

Does zenmodeler run on a delegate host?

If so, I presume that the password you are entering is the password for the user executing the serviced command.

If that is the case, setup ssh to allow for password less keys and put your public key in ~/.ssh/authorized_keys on all of the delegate hosts.
If your hosts do not have a MOTD display, then it is not obvious that the connection is happening over SSH.

------------------------------
Jim Regovich
------------------------------


< Previous
Help with getting value for bgpPeerState.ifIndex in transform?
  Next
POSKeyError in console
>