# OpenZiti and terminators

**URL:** <https://openziti.discourse.group/t/openziti-and-terminators/400>\
**Category:** Building/Development\
**Created:** [April 13, 2022, 7:08am UTC](https://openziti.discourse.group/t/openziti-and-terminators/400 "2022-04-13T07:08:01Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [April 13, 2022, 1:07pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/21 "2022-04-13T13:07:18Z")

</div>

are you `zssh opc@ssh.client.ziti`? seems that way based on the “for identity ssh.client.ziti”

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 1:21pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/22 "2022-04-13T13:21:31Z")

</div>

here is the command

zssh opc@ssh.client.ziti -d -s ssh\_server -c zssh.json -i abc.key

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 1:22pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/23 "2022-04-13T13:22:25Z")

</div>

not sure how else to debug…

I tried ssh ssh.client.ziti but the host did not resolve

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 1:23pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/24 "2022-04-13T13:23:57Z")

</div>

This is from the logs from the tunneller

```
540.283] INFO ziti-edge-tunnel:ziti-edge-tunnel.c:315 send_events_message() Events Message => {"Op":"controller","Action":"connected","Identifier":"./ssh_server.json"}

```

[1010.582] ERROR ziti-sdk:connect.c:442 connect\_get\_net\_session\_cb() conn[0.0] failed to get session for service[ssh\_server]: NOT\_FOUND(The resource requested was not found or is no longer available)  
[1010.582] WARN ziti-sdk:connect.c:1117 rebind\_cb() conn[0.0] failed to re-bind [-17/Service not available]  
[1010.582] ERROR tunnel-cbs:ziti\_hosting.c:534 on\_hosted\_client\_connect() incoming connection to service[ssh\_server] failed: Service not available  
[1010.842] INFO tunnel-cbs:ziti\_tunnel\_cbs.c:547 ziti\_sdk\_c\_on\_service() service unavailable: ssh\_server  
[

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 1:25pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/25 "2022-04-13T13:25:15Z")

</div>

Here is the service…that shows the terminator is running

 ![Screen Shot 2022-04-13 at 11.24.47 pm](https://global.discourse-cdn.com/free1/uploads/netfoundry/original/1X/c5383ac19e109852d55c173e1c37f5f9573b928d.jpeg)

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [April 13, 2022, 1:30pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/26 "2022-04-13T13:30:09Z")

</div>

i might ask you to just use [the zssh cheatsheat](https://raw.githubusercontent.com/openziti/ziti-doc/main/docfx_project/articles/zitification/zitifying-ssh/zssh-cheat-sheet.md) now... I am positive that works. Generally speaking when I get into this situation - it's always some little think my brain just won't let me 'see' until I eventually find what I messed up...

> [@markamind](#):
>
> [1010.582] ERROR tunnel-cbs:ziti\_hosting.c:534 on\_hosted\_client\_connect() incoming connection to service[ssh\_server] failed: Service not available

This is good - makes me think that things are really close!

I'm not sure what "service not available" means. Can you show me the config? Is it pointing to "tcp:localhost:22"?

Also would be good to run `ziti edge policy-advisor services` and show me that output too.

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 1:31pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/27 "2022-04-13T13:31:02Z")

</div>

I tried changing the role attributes.. which created another error

> FATAL service not found: ssh\_server

this makes sense.. so I changed it back.. for a different fatal erro

> FATAL error when dialing service name ssh\_server. unable to dial service 'ssh\_server': dial failed: service QOFOXnUf8h has no terminators for identity ssh.client.ziti

so.. it found it.. but the dialing did not.. would that be about right?

Maybe I need to create that dialing config manually..?

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 1:38pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/28 "2022-04-13T13:38:10Z")

</div>

ziti edge list terminators

id: VR7y  
service: ssh\_server  
router: instance-20220317-1005-edge-router  
binding: edge  
address: hosted:b032ee03-20a5-4052-92c5-46e969209bdb

identity: cost: 0 precedence: default dynamic-cost: 0

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 1:44pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/29 "2022-04-13T13:44:28Z")

</div>

OKAY : ssh\_client (1) → ssh\_server (1) Common Routers: (1/1) Dial: Y Bind: N

OKAY : ssh\_server (1) → ssh\_server (1) Common Routers: (1/1) Dial: N Bind: Y

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 1:45pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/30 "2022-04-13T13:45:10Z")

</div>

I will delete the services and configs… and try manually using the cheat sheet… will revert shortly 🙂

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 2:04pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/31 "2022-04-13T14:04:27Z")

</div>

got it.

zssh opc@ssh\_server -d -s ssh-server -c .json -i .key  
INFO username set to: opc  
INFO targetIdentity set to: ssh\_server  
INFO connection to edge router using api session token 9bacfc42-265e-4917-baf8-111bad122c1f  
connected.  
Activate the web console with: systemctl enable --now cockpit.socket

Last login: Wed Apr 13 13:09:11 2022 from 111.220.140.199

adding /home/opc/.ziti/quickstart/instance-20220317-1005/ziti-bin/ziti-v0.25.4 to the path

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 2:05pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/32 "2022-04-13T14:05:17Z")

</div>

I think I made the server identity and the name of the service the same… so it was getting confused… or something like that

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 2:06pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/33 "2022-04-13T14:06:56Z")

</div>

These were all of the commands.

ziti edge create config ssh-server-host.v1 host.v1 ‘{“protocol”:“tcp”, “address”:“localhost”,“port”:22, “listenOptions”: {“bindUsingEdgeIdentity”:true}}’

ziti edge create config ssh-server-client-config intercept.v1 ‘{“protocols”:[“tcp”],“addresses”:[“ssh.server.ziti”], “portRanges”:[{“low”:20, “high”:20}]}’

ziti edge create service ssh-server --configs ssh-server-client-config, ssh-server-host.v1

ziti edge create service-policy ssh-server-binding Bind --service-roles ‘@ssh-server’ --identity-roles ‘@ssh\_server’  
ziti edge create service-policy ssh-server-dialing Dial --service-roles ‘@ssh-server’ --identity-roles ‘@ssh\_client’

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 2:07pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/34 "2022-04-13T14:07:27Z")

</div>

> [@markamind](#):
>
> ziti edge create config ssh-server-client-config intercept.v1 ‘{“protocols”:[“tcp”],“addresses”:[“ssh.server.ziti”], “portRanges”:[{“low”:20, “high”:20}]}’

My understanding is this one is actually not required.. is that correct?

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 13, 2022, 2:10pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/35 "2022-04-13T14:10:35Z")

</div>

this is because.. when you use the zssh.. it uses the identity "ssh\_server" and the service "ssh-server" in the example below

zssh opc@ssh\_server -d -s ssh-server

> btw.. this is a bad naming convention.. which probably caused most of my issues.

do you have any guides... I have noticed that sometimes there is an underscore.. sometimes a period ...

What have you found the best approach?

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [April 13, 2022, 3:01pm UTC](https://openziti.discourse.group/t/openziti-and-terminators/400/36 "2022-04-13T15:01:54Z")

</div>

> [@markamind](#):
>
> My understanding is this one is actually not required… is that correct?

Right - when using zssh you don't need that whatsoever. Looking at it - it's also wrong since it doesn't have the necessary ListenOptions - i should delete that....

> [@markamind](#):
>
> What have you found the best approach?

Best approach for naming conventions - lol i WISH! I keep refining my OWN! 😃 If you look at the sort of stuff I do now, I will CLEARLY mark a service with ".svc" and I sometimes will make identities with ".id"... Since it's "any string you want" - I fall into similar traps myself. I try **really** hard not to reuse the exact same string anywhere because it's just so dang easy to screw up (for me). So when i add an attribute to an identity, it'll be something obvious, and plural like "sshable endpoints". Or "ssh servers" ...

I don't have any great advice other than "use what works for you" 🙂

[Previous page](https://openziti.discourse.group/t/openziti-and-terminators/400.md?page=1)
