# openSSL command help

**URL:** <https://community.unix.com/t/openssl-command-help/311909>\
**Category:** Shell Programming and Scripting\
**Created:** [June 14, 2012, 10:19am UTC](https://community.unix.com/t/openssl-command-help/311909 "2012-06-14T10:19:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shade917](https://community.unix.com/letter_avatar/shade917/32/6_22734026db12803ebb3e059622ac3534.png) [@shade917](https://community.unix.com/u/shade917)\
**Post date:** [June 14, 2012, 10:19am UTC](https://community.unix.com/t/openssl-command-help/311909/1 "2012-06-14T10:19:06Z")

</div>

I am running a openssl command like this:

```nohighlight
openssl s_client -showcerts -connect $fqdn:$port

```

and the result is some ridiculous amount of stuff but i only want to cut out part of the certificate chain. How do i do that?

---

<div class="post-metadata">

**Author:** ![zaxxon](https://community.unix.com/user_avatar/community.unix.com/zaxxon/32/660_2.png) [@zaxxon](https://community.unix.com/u/zaxxon)\
**Post date:** [June 14, 2012, 10:28am UTC](https://community.unix.com/t/openssl-command-help/311909/2 "2012-06-14T10:28:26Z")

</div>

Show the output you get using [code tags](http://www.unix.com/how-post-unix-linux-forums/167686-forum-video-tutorial-how-use-code-tags.html), thanks.  
Mark the part you need bold, for example.

---

<div class="post-metadata">

**Author:** ![shade917](https://community.unix.com/letter_avatar/shade917/32/6_22734026db12803ebb3e059622ac3534.png) [@shade917](https://community.unix.com/u/shade917)\
**Post date:** [June 14, 2012, 10:35am UTC](https://community.unix.com/t/openssl-command-help/311909/3 "2012-06-14T10:35:57Z")

</div>

The output of the code would be something like this:

```nohighlight
blah blah
blah blah

Certificate chain
 0 s:/C=US/ST=New Jersey/L=Passaic/O=Super Secret Company/OU=Webserver/CN=blah blah blah
blah blah
blah blah
....

```

The bold is the part i need
