For the server technology I'm working with, it's possible to join a server to a collective manually by running some command line arguments. At one point the console prompts you if you want to accept a certificate chain, to which you input (y/n)
and the command keeps running. I'm trying to automate the process but I've hit a snag with responding to the input prompt and after digging around have heard that it could be an SSL thing so I didn't know if there was a different way of doing it.
If you do it manually, this is how it looks:
Joining the collective with target controller ...this may take a while
SSL trust has not been established with the target server
//certificate chain
Do you want to accept the above certificate chain? (y/n)
However, both:
echo "y y" | bash ./script.sh
//inside script.sh
echo "y y" | $(command)
End up with this response:
Joining the collective with target controller ...this may take a while
SSL trust has not been established with the target server
//certificate chain
Input console is not available
Aborting join collective.
Error:
Unable to complete the MBean operation
Error: java.securit.cert.CertificateException: User has rejected the request to trust the
certificate chain
I was hoping somebody may be able to shed some light on a way to do it outside of just responding manually