How to use s_client command

HI,

Am not able to close open ssl session once after excuting the s_client command.Please help me.

Find below command which am using in my script:

openssl s_client -connect localhost:443 -debug >/tmp/tempfile.txt 2>&1

after this can you please let us know how to kill this process.

Thanks for your help in advance.

ps -ef |grep openssl 

my question here is it is not allowing me to go next line .So am using ctrl+c to close the session manually.

But in the script am not sure how to implement this.Please help me.