# Authentication Failure while connecting Database using SSH tunnel

When attempting to connect a Warehouse to Daton via an SSH tunnel, the following error occurs:

```
SSH_MSG_DISCONNECT: 2 Too many authentication failures
```

### Solution: <a href="#solution-0" id="solution-0"></a>

While configuring the destination, if the SSH tunnel option is chosen,

1\. Copy the SSH Public Key.

<figure><img src="https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16494/4275568/image20240731-106-8cir9b.png" alt="" width="450"><figcaption></figcaption></figure>

2\. Login to SSH server.&#x20;

3\. Paste the public Key in authorised\_keys file.

Run the following command and then paste the key:

```
vi .ssh/authorized_keys 
```

4\. After Pasting, come back to Daton and click on Next.
