# Connect Jenkins Agent/Node with URL instead of Port communication

**URL:** <https://community.jenkins.io/t/connect-jenkins-agent-node-with-url-instead-of-port-communication/3219>\
**Category:** Ask a question\
**Tags:** question\
**Created:** [August 1, 2022, 7:20am UTC](https://community.jenkins.io/t/connect-jenkins-agent-node-with-url-instead-of-port-communication/3219 "2022-08-01T07:20:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pratik](https://avatars.discourse-cdn.com/v4/letter/p/4bbf92/32.png) [@Pratik](https://community.jenkins.io/u/Pratik)\
**Post date:** [August 1, 2022, 7:20am UTC](https://community.jenkins.io/t/connect-jenkins-agent-node-with-url-instead-of-port-communication/3219/1 "2022-08-01T07:20:49Z")

</div>

Hello!

I want to connect one server as a Jenkins agent/node, but ports like SSH port(22), and JNLP port cannot be opened due to security reasons. So is there any other way to connect agents?

Like, if we create an URL that has JenkinsMasterIP:Port and connect with it. URL can be created, and there is communication happening with Jenkins URL from the agent.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [August 1, 2022, 7:35am UTC](https://community.jenkins.io/t/connect-jenkins-agent-node-with-url-instead-of-port-communication/3219/2 "2022-08-01T07:35:56Z")

</div>

Kinda old post now, but should get you started. [WebSocket](https://www.jenkins.io/blog/2020/02/02/web-socket/)

You can tell your agent to connect back to the controller over http

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [August 1, 2022, 7:36am UTC](https://community.jenkins.io/t/connect-jenkins-agent-node-with-url-instead-of-port-communication/3219/3 "2022-08-01T07:36:48Z")

</div>

You can also connect out to agents (instead of in from agents) using the ssh plugin

---

<div class="post-metadata">

**Author:** ![Pratik](https://avatars.discourse-cdn.com/v4/letter/p/4bbf92/32.png) [@Pratik](https://community.jenkins.io/u/Pratik)\
**Post date:** [August 1, 2022, 4:13pm UTC](https://community.jenkins.io/t/connect-jenkins-agent-node-with-url-instead-of-port-communication/3219/4 "2022-08-01T16:13:47Z")

</div>

Thank you @halkeye - This solution worked.

Reference URL: [https://docs.cloudbees.com/docs/cloudbees-ci-kb/latest/client-and-managed-masters/how-to-access-websockets-for-jenkins-inbound-agents](https://docs.cloudbees.com/docs/cloudbees-ci-kb/latest/client-and-managed-masters/how-to-access-websockets-for-jenkins-inbound-agents)
