# Connecting Aerospike over SSH Tunnel

**URL:** <https://discuss.aerospike.com/t/connecting-aerospike-over-ssh-tunnel/10874>\
**Category:** Client Libraries\
**Created:** [March 7, 2024, 8:01am UTC](https://discuss.aerospike.com/t/connecting-aerospike-over-ssh-tunnel/10874 "2024-03-07T08:01:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![priyank](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/priyank/32/2173_2.png) [@priyank](https://discuss.aerospike.com/u/priyank)\
**Post date:** [March 7, 2024, 8:01am UTC](https://discuss.aerospike.com/t/connecting-aerospike-over-ssh-tunnel/10874/1 "2024-03-07T08:01:55Z")

</div>

Aerospike server is running on a port 3000. The server is not directly accessible from my machine. But it is accessible via a machine that I can access over SSH. So I created a SSH tunnel as given below and then configure the driver to connect to localhost:3000

ssh -L 3000:44.55.66.77:3000 [user@33.44.55.66](mailto:user@33.44.55.66)

44.55.66.77 = Aerspike Server IP

33.44.55.66 = IP of the server from which Aerospike is accessible.

We use SSH tunneling all the time with different server like Oracle, Nginx etc. so I am sure about correctness of the SSH command. But something is failing during the handshake between the client and server.

I suspect Aerospike server is giving the client, IPs of all cluster nodes and then the client tries to connect directly to those IPs which is failing. This happens to be a single node cluster BTW.

Is there a solution for this?

---

<div class="post-metadata">

**Author:** ![meher](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/meher/32/1644_2.png) [@meher](https://discuss.aerospike.com/u/meher)\
**Post date:** [March 13, 2024, 9:25pm UTC](https://discuss.aerospike.com/t/connecting-aerospike-over-ssh-tunnel/10874/2 "2024-03-13T21:25:32Z")

</div>

I am not an expert on SSH Tunnel but you can instruct the server to advertise a different address from its own using the [access-address](https://aerospike.com/docs/server/reference/configuration?search=access-address&context=all&version=all#network__access-address) configuration.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/system/32/2274_2.png) [@system](https://discuss.aerospike.com/u/system)\
**Post date:** [March 13, 2025, 9:25pm UTC](https://discuss.aerospike.com/t/connecting-aerospike-over-ssh-tunnel/10874/3 "2025-03-13T21:25:51Z")

</div>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
