# How is cmd/serv.go called by SSH shell?

**URL:** <https://forum.gitea.com/t/how-is-cmd-serv-go-called-by-ssh-shell/4829>\
**Category:** General\
**Created:** [March 8, 2022, 8:52pm UTC](https://forum.gitea.com/t/how-is-cmd-serv-go-called-by-ssh-shell/4829 "2022-03-08T20:52:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elsappp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/elsappp/32/2440_2.png) [@elsappp](https://forum.gitea.com/u/elsappp)\
**Post date:** [March 8, 2022, 8:52pm UTC](https://forum.gitea.com/t/how-is-cmd-serv-go-called-by-ssh-shell/4829/1 "2022-03-08T20:52:14Z")

</div>

Hi everyone,

Does anyone know how cmd/serv.go is called by SSH shell?  
[here](https://github.com/go-gitea/gitea/blob/main/cmd/serv.go#L42) It says `This command should only be called by SSH shell`. Does anyone know how SSH shell can call it? Does it mean we configure something in sshd config file so that it knows to call it?

I am just trying to understand how this is working: is it like for each SSH connection, a new gitea process is created?

Thanks!

---

<div class="post-metadata">

**Author:** ![techknowlogick](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/techknowlogick/32/4706_2.png) [@techknowlogick](https://forum.gitea.com/u/techknowlogick)\
**Post date:** [March 9, 2022, 5:10pm UTC](https://forum.gitea.com/t/how-is-cmd-serv-go-called-by-ssh-shell/4829/2 "2022-03-09T17:10:24Z")

</div>

yes, look into the authorized\_key file, and you’ll see that `gitea serv` is called. a full gitea process isn’t created, as the serv command is a lightweight connector that’ll interface with the running gitea process.
