Reputation: 2843
I am writing a script that calls the command.
openssl s_client -showcerts -connect server:9999 > out.pem -key key.pem -cert cert.pem -pass pass:password
But it displays an output, I tried adding -quiet but with no luck. Is there a way I can get it so that it won't report to the console. If I run the command in terminal I have to type exit to get out of the connection.
I want this to exit automatically within my script. Is there a way to do that?
Upvotes: 4
Views: 7603
Reputation: 306
For the automatically exit part, you could do this:
echo | openssl s_client -connect www.google.com:443
Upvotes: 8
Reputation: 41222
The output is possibly being sent to stderr (rather than stdout). It should work if you use >&
for the redirection.
Upvotes: 1