> For the complete documentation index, see [llms.txt](https://docs.tessell.com/tessell/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tessell.com/tessell/tessell-for-oracle/database-connections-using-ssl-tls/linux-platform.md).

# Linux platform

### Tools/Libraries

1. Download and unzip the Oracle instant client from <https://www.oracle.com/cis/database/technologies/instant-client/linux-x86-64-downloads.html>.
2. Download and unzip the *SQLcl* from [*https://www.oracle.com/database/sqldeveloper/technologies/sqlcl/download/*](https://www.oracle.com/database/sqldeveloper/technologies/sqlcl/download/)*.*

   For example, Instant client is unzipped in */home/ubuntu/\<user>/instantclient\_21\_9* and *SQLcl* is unzipped in */home/ubuntu/\<user>/sqlcl.*

### Setup Oracle wallet

Installing `orapki` utility from Oracle takes more time and needs to install whole fusion middleware packages. Instead, please use the below script.

{% code lineNumbers="true" %}

```bash
#!/bin/bash
# set classpath for orapki - align this to your local SQLcl installation
SQLCL=<sqlcl unzipped path>/lib/ # For ex - /home/ubuntu/<user>/sqlcl/lib/
CLASSPATH=${SQLCL}/oraclepki.jar:${SQLCL}/osdt_core.jar:${SQLCL}/osdt_cert.jar
# simulate orapki command
java -classpath ${CLASSPATH} oracle.security.pki.textui.OraclePKITextUI "$@"
```

{% endcode %}

{% code lineNumbers="true" %}

```bash
# Make orapki as executable
# chmod +x orapki
```

{% endcode %}

### Import CA certificate to wallet <a href="#import-ca-certificate-to-wallet" id="import-ca-certificate-to-wallet"></a>

* Download the CA certificate from DB service **Overview** page.

  <figure><img src="/files/zqZOCwWY7VUwRGUjLcJy" alt=""><figcaption></figcaption></figure>
* Create wallet directory.

{% code lineNumbers="true" %}

```
./orapki wallet create -wallet /home/ubuntu/<user>/wallet/ -auto_login_only
```

{% endcode %}

* Import CA certificate to the wallet.

{% code lineNumbers="true" %}

```
./orapki wallet add -wallet /home/ubuntu/<user>/wallet/ -trusted_cert -cert TessellCA.crt -auto_login_only
```

{% endcode %}

* Verify the CA in the wallet.

{% code lineNumbers="true" %}

```
./orapki wallet display -wallet /home/ubuntu/<user>/wallet/
Oracle PKI Tool Release 21.0.0.0.0 - Production
Version 21.0.0.0.0
Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
Requested Certificates:
User Certificates:
Trusted Certificates:
Subject:        CN=tessell.com
```

{% endcode %}

### sqlnet.ora <a href="#sqlnet.ora" id="sqlnet.ora"></a>

* Create *sqlnet.ora* file with wallet location in *\<instant\_client\_path>network/admin.*

{% code lineNumbers="true" %}

```
WALLET_LOCATION =
  (SOURCE =
   (METHOD = FILE)
   (METHOD_DATA =
    (DIRECTORY = /Users/<user>/orainscli/test_wallet)
   )
  )
SQLNET.AUTHENTICATION_SERVICES = (TCPS,NTS,BEQ)
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_CIPHER_SUITES = (SSL_RSA_WITH_AES_256_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA)
SSL_SERVER_DN_MATCH = ON
```

{% endcode %}

* Connect using sqlplus.
  * Download and install sqlplus package.
  * Set ORACLE\_HOME (where instant lib and sqlplus are installed/unzipped).

{% code lineNumbers="true" %}

```
export ORACLE_HOME=/home/ubuntu/<user>/instantclient_21_9
```

{% endcode %}

confirm sqlnet.ora is present in $ORACLE\_HOME/network/admin

* Connect to DB.

{% code lineNumbers="true" %}

```
sqlplus <user>/<password>@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCPS)(HOST = oraclessl<service name>dnd-efwyu.qarel.tsl-barc.cloud)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = <service name>))(SECURITY = (SSL_SERVER_CERT_DN = "CN=oraclessl<service name>dnd-efwyu.qarel.tsl-barc.cloud")))
```

{% endcode %}

* Confirm connected protocol.

{% code lineNumbers="true" %}

```
SQL> SELECT sys_context('USERENV', 'NETWORK_PROTOCOL') as network_protocol, sys_context('USERENV', 'AUTHENTICATION_METHOD') as authentication_method FROM dual;
NETWORK_PROTOCOL
--------------------------------------------------------------------------------
AUTHENTICATION_METHOD
--------------------------------------------------------------------------------
tcps
PASSWORD
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tessell.com/tessell/tessell-for-oracle/database-connections-using-ssl-tls/linux-platform.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
