> 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/database-engines/tessell-for-oracle/database-connections-using-ssl-tls/linux-platform.md).

# Linux platform

This guide covers connecting to a Tessell Oracle database service over SSL/TLS on Linux using SQL\*Plus.

***

## Step 1 — Install tools

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

For example:

* Instant Client: `/home/ubuntu/<user>/instantclient_21_9`
* SQLcl: `/home/ubuntu/<user>/sqlcl`

***

## Step 2 — Set up `orapki`

Installing `orapki` directly from Oracle requires the full Fusion Middleware package. Use the following script instead to simulate `orapki` via SQLcl's bundled JARs:

```bash
#!/bin/bash
# set classpath for orapki - align this to your local SQLcl installation
SQLCL=<sqlcl unzipped path>/lib/   # e.g. /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 "$@"
```

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

***

## Step 3 — Download the CA certificate

Download the CA certificate from the **Overview** tab of your DB service in Tessell (**My Services → Overview → CA Certificate**).

<div align="center"><img src="https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2Fgit-blob-e164e1fc0feb4656cf68402a48eba3800c20a5a8%2Fimage.png?alt=media" alt="" width="800"></div>

<p align="center"><em>Figure 1 — CA Certificate download on the service Overview page</em></p>

***

## Step 4 — Create the Oracle wallet and import the certificate

1. Create the wallet directory:

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

2. Import the Tessell CA certificate:

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

3. Verify the certificate was imported:

```
./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
```

***

## Step 5 — Configure `sqlnet.ora`

Create a `sqlnet.ora` file in `<instant_client_path>/network/admin` with the following content:

```
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
```

***

## Step 6 — Connect using SQL\*Plus

1. Download and install the SQL\*Plus package.
2. Set `ORACLE_HOME` to the Instant Client directory:

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

3. Confirm `sqlnet.ora` is present in `$ORACLE_HOME/network/admin`.
4. Connect to the database:

```
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")))
```

> **Tip:** The Tessell service Overview page provides a pre-configured connection string you can use as a starting point.

5. Verify the connected protocol:

```sql
SELECT sys_context('USERENV', 'NETWORK_PROTOCOL') as network_protocol,
       sys_context('USERENV', 'AUTHENTICATION_METHOD') as authentication_method
FROM dual;
```

Expected output:

```
NETWORK_PROTOCOL                    AUTHENTICATION_METHOD
----------------------------------- -----------------------------------
tcps                                PASSWORD
```


---

# 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
