# Keeping alive socks proxy

**URL:** <https://forum.datomic.com/t/keeping-alive-socks-proxy/593>\
**Category:** Datomic Cloud\
**Created:** [August 22, 2018, 4:23pm UTC](https://forum.datomic.com/t/keeping-alive-socks-proxy/593 "2018-08-22T16:23:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaret](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/jaret/32/45_2.png) [@jaret](https://forum.datomic.com/u/jaret)\
**Post date:** [August 22, 2018, 4:23pm UTC](https://forum.datomic.com/t/keeping-alive-socks-proxy/593/1 "2018-08-22T16:23:11Z")

</div>

Making this suggestion searchable by quoting advice given in slack and adding to forums.

> Autossh for keeping alive the socks proxy:

> Not sure who to message with this, but I have a suggestion.

> I’m using datomic cloud and developing against it, which basically means a long running datomic-socks-proxy process. This was quite painful due to frequent timeouts and disconnects, causing me to having to keep jumping across and restarting it.

> I installed autossh instead and hacked the script to use this, and it is now much more stable (and survives sleeps of my laptop). I wonder whether it might be worth having the standard script check for the installation of autossh and if found, use that instead (and maybe print a message to the user if not found, before continuing with the regular ssh client).

> For anybody interested in my little hack, I just commented out the ssh command at the bottom of the script, and added the autossh one. Like this…

```auto
`#ssh -v -i $PK -CND ${SOCKS_PORT:=8182} ec2-user@${BASTION_IP}`
`autossh -M 0 -o "ServerAliveInterval 5" -o "ServerAliveCountMax 3" -v -i $PK -CND ${SOCKS_PORT:=8182} ec2-user@${BASTION_IP}`

```

---

<div class="post-metadata">

**Author:** ![danie](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@danie](https://forum.datomic.com/u/danie)\
**Post date:** [September 5, 2019, 11:52am UTC](https://forum.datomic.com/t/keeping-alive-socks-proxy/593/2 "2019-09-05T11:52:19Z")

</div>

To the Datomic team, this will help me. Then we can override the SSH command as we want (I sed it now).

```
${SSH:=ssh} -v -o IdentitiesOnly=yes -i $PK -CND ${SOCKS_PORT:=8182} ec2-user@${BASTION_IP}
```
