如何在"openssl s_client -connect"内部强制退出? [英] How can I force quit inside "openssl s_client -connect"?
本文介绍了如何在"openssl s_client -connect"内部强制退出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写一个调用命令的脚本.
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
但是它显示输出,我尝试添加-quiet但没有运气.有没有一种方法可以使我不向控制台报告.如果我在终端中运行命令,则必须键入exit才能退出连接.
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 with in my script. Is there a way to do that?
推荐答案
输出可能被发送到stderr(而不是stdout).如果您使用>&
进行重定向,它应该可以工作.
The output is possibly being sent to stderr (rather than stdout). It should work if you use >&
for the redirection.
这篇关于如何在"openssl s_client -connect"内部强制退出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文