# add ssl cert through command line

**URL:** <https://community.f5.com/t/add-ssl-cert-through-command-line/4946>\
**Category:** Technical Forums\
**Tags:** dev, irules, devops, application-delivery\
**Created:** [September 18, 2008, 9:01pm UTC](https://community.f5.com/t/add-ssl-cert-through-command-line/4946 "2008-09-18T21:01:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dacrud\_18985](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@dacrud\_18985](https://community.f5.com/u/dacrud_18985)\
**Post date:** [September 18, 2008, 9:01pm UTC](https://community.f5.com/t/add-ssl-cert-through-command-line/4946/1 "2008-09-18T21:01:16Z")

</div>

Hi all,

Is there anyway to import an ssl cert, and then add it to a VIP through the command line? The interface seems to take a while.

Thanks!

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [September 19, 2008, 8:28am UTC](https://community.f5.com/t/add-ssl-cert-through-command-line/4946/2 "2008-09-19T08:28:06Z")

</div>

Hi there,

You can copy the cert/key to the filesystem using SCP. The cert directory is /config/ssl/ssl.crt/ and the key directory is /config/ssl/ssl.key/. You could then define a clientSSL profile which references the crt and key using bigpipe. You might want to create one profile via the GUI with the custom options you want specified and then run ‘b profile CLIENTSSL\_PROFILE\_NAME list’ to view how it is set in the configuration. Here’s an example of how to run the command via the CLI:

```tcl
b profile clientssl httpsvip_clientssl {\ 
    defaults from clientssl\ 
    key "httpsvip.example.com.key"\ 
    cert "httpsvip.example.com.crt"\ 
    chain "ca-bundle.crt"\ 
    ca file none\ 
    ciphers "DEFAULT"\ 
    options\ 
       dont insert empty fragments\ 
       no sslv2\ 
    modssl methods disable\ 
    cache size 20K\ 
    cache timeout 3600\ 
    renegotiate period indefinite\ 
    renegotiate size indefinite\ 
    renegotiate max record delay 10\ 
    handshake timeout 60\ 
    alert timeout 60\ 
    unclean shutdown enable\ 
    strict resume disable\ 
    nonssl disable\ 
 }

```

bigpipe makes the change to the config running in memory. To write the changes to the bigip.conf file, run ‘b save’.

You might also want to look into why the GUI is slow. There was a recent post with some suggestions ([Click here](http://devcentral.f5.com/Default.aspx?tabid=53&view=topic&postid=27152&ptarget=27161)). Else, you could open a case with F5 Support and ask them to help investigate the issue.

Aaron

---

<div class="post-metadata">

**Author:** ![JRahm](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/jrahm/32/3327_2.png) [@JRahm](https://community.f5.com/u/JRahm)\
**Post date:** [September 19, 2008, 11:34am UTC](https://community.f5.com/t/add-ssl-cert-through-command-line/4946/3 "2008-09-19T11:34:48Z")

</div>

Another trick in adding things at the command line I learned is to use the apostrophe to avoid all the backslashes:

```tcl
b profile cilentssl httpsvip_clientssl '{ 
     defaults from clientssl 
     key ... 
     cert .... 
 }'

```

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [September 19, 2008, 12:50pm UTC](https://community.f5.com/t/add-ssl-cert-through-command-line/4946/4 "2008-09-19T12:50:58Z")

</div>

That’s a keeper. Thanks!

Aaron

---

<div class="post-metadata">

**Author:** ![dacrud\_18985](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@dacrud\_18985](https://community.f5.com/u/dacrud_18985)\
**Post date:** [September 19, 2008, 8:58pm UTC](https://community.f5.com/t/add-ssl-cert-through-command-line/4946/5 "2008-09-19T20:58:21Z")

</div>

Thanks a bunch.
