# tcpTunnel Connection Refused

**URL:** <https://openziti.discourse.group/t/tcptunnel-connection-refused/3666>\
**Category:** zrok\
**Created:** [December 24, 2024, 8:19am UTC](https://openziti.discourse.group/t/tcptunnel-connection-refused/3666 "2024-12-24T08:19:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mihkuno](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/mihkuno/32/2932_2.png) [@mihkuno](https://openziti.discourse.group/u/mihkuno)\
**Post date:** [December 24, 2024, 8:19am UTC](https://openziti.discourse.group/t/tcptunnel-connection-refused/3666/1 "2024-12-24T08:19:43Z")

</div>

One of my home server suddenly wont let me access an ssh share. It was working fine 2 days ago. I tried to test this by recreating a share on Ubuntu with PLDT as my ISP (as well as windows with different Globe ISP) but both shows the same Connection Refused error as shown below.

 ![image](https://global.discourse-cdn.com/free1/uploads/netfoundry/original/2X/3/3aa17e42ec7280ba75de2ed21bc57cca84fa17c7.png)

Moreover, web share works fine.. I speculate there is something wrong with the tcp backend of zrok.

P.S I'm using the zrokNet Starter with only 2 environments and 4 private shares, and in the last 7 days my metrics are less than 650mb.

Looks like a similar error [Today I randomly got this error connecting to zrok](https://openziti.discourse.group/t/today-i-randomly-got-this-error-connecting-to-zrok/2951)

---

<div class="post-metadata">

**Author:** ![mihkuno](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/mihkuno/32/2932_2.png) [@mihkuno](https://openziti.discourse.group/u/mihkuno)\
**Post date:** [December 24, 2024, 10:29am UTC](https://openziti.discourse.group/t/tcptunnel-connection-refused/3666/2 "2024-12-24T10:29:14Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/netfoundry/original/2X/0/03aa12de68d96299b59346312762c40633bd64c1.jpeg)

---

<div class="post-metadata">

**Author:** ![smilindave26](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/smilindave26/32/185_2.png) [@smilindave26](https://openziti.discourse.group/u/smilindave26)\
**Post date:** [December 24, 2024, 2:24pm UTC](https://openziti.discourse.group/t/tcptunnel-connection-refused/3666/3 "2024-12-24T14:24:28Z")

</div>

Hi @mihkuno - welcome to the community!

It looks like the connection to your ssh server happens successfully over zrok, but then your host rejects ("refuses") the connection. Are you able to connect directly to your ssh server outside of zrok? There are a number of posts on stackoverflow that give some advice on troubleshooting `kex_exchange_identification: Connection closed by remote host` (e.g., [ssl - kex\_exchange\_identification: Connection closed by remote host - Stack Overflow](https://stackoverflow.com/questions/67000681/kex-exchange-identification-connection-closed-by-remote-host)) that might be helpful.

---

<div class="post-metadata">

**Author:** ![qrkourier](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/qrkourier/32/52_2.png) [@qrkourier](https://openziti.discourse.group/u/qrkourier)\
**Post date:** [December 24, 2024, 4:09pm UTC](https://openziti.discourse.group/t/tcptunnel-connection-refused/3666/4 "2024-12-24T16:09:45Z")

</div>

The device named "LOQ" where you ran `zrok share private -b tcpTunnel 127.0.0.1:22 ` displays an error:

> TCP 127.0.0.1:22: connect: connection refused

This means the SSH server is unavailable at the address 127.0.0.1:22. You must share a TCP address that LOQ can reach without zrok. Then, you can reach the SSH server from another device by running `zrok access private`.

---

<div class="post-metadata">

**Author:** ![mihkuno](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/mihkuno/32/2932_2.png) [@mihkuno](https://openziti.discourse.group/u/mihkuno)\
**Post date:** [December 27, 2024, 11:55am UTC](https://openziti.discourse.group/t/tcptunnel-connection-refused/3666/5 "2024-12-27T11:55:31Z")

</div>

Yeahh this was the prob.. I've forgotten to setup the ssh server autostart for the windows machine.. as for the ubuntu machine it was a fresh install, it probably had the similar prob. Thanks for pointing this out :'))
