Port Tunneling
JFrog Connect API requests to support port tunneling.
This page has requests to support port tunneling, such as opening and closing port tunneling sessions, and has requests to get information about the open port tunnels.
Prerequisites
The following are required to use the port tunneling API requests:
You must have the following Project Permission defined:
Remote Terminal & Port Tunnel.
For using a remote SSH session, you need ssh-client installed on the device.
No ports need to be open on the device or the firewall for port tunneling to work.
Opens a port tunneling session with the device that you specify.
Once you obtain the server address and port, you are ready to interact with the device. The following are some examples of different types of interfaces you can use and hyperlinks to the simple procedure for each one.
- For access with VNC: Open the VNC Viewer on Your Computer
- To connect with SSH: Open a Terminal Window
- Access Device Web Applications: Access the Web Page
The project key of the relevant project in the account. An account can have multiple projects. If you don't know the project key, you can find it in the Settings of the web UI in the Projects tab.
The UUID of the device you want to connect to.
The port you want to forward. This can be any port number. For example, use 22 for a secure SSH connection to your device.
The port will be accessible only from this IP address. If you do not use this parameter, the allowed IP will be your current IP address.
POST /api/v2/{project_key}/port_tunnel HTTP/1.1
Host: api.connect.jfrog.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 62
{
"device_uuid": "d-c8b9-02aa",
"port": 22,
"allowed_ip": "1.1.1.1"
}
Created
{
"port_tunnel_id": "7d7a7462-cc5b-4f9a-b678-d3288475de02",
"server_address": "d-c8b9-02aa-crwapf2u2ia.forwarding.connect.jfrog.io",
"server_port": 44187
}
Gets information about all the port tunnels in a project. The port tunnels may be open or closed (also called finished). The status
returned may be one of the following:
Pending
: A new port tunnel that has not yet opened.Opened
: A port tunneling session currently active.Closed
: The user has ended the port tunneling session.Terminated
: The tunnel was closed, but not due to user request.
The project key of the relevant project in the account. An account can have multiple projects. If you don't know the project key, you can find it in the Settings of the web UI in the Projects tab.
GET /api/v2/{project_key}/port_tunnel HTTP/1.1
Host: api.connect.jfrog.io
Authorization: Bearer JWT
Accept: */*
OK
[
{
"created_time": "Mon, 16 Dec 2024 10:17:37 GMT",
"device_id": "d-c8b9-02aa",
"finish_time": "Mon, 16 Dec 2024 10:17:59 GMT",
"port_tunnel_id": "015900c8-3dae-43bd-8133-cb828470b73e",
"remote_server_address": "d-c8b9-02aa-agwb8q9wfem.forwarding.connect.jfrog.io",
"remote_server_port": 52466,
"status": "closed",
"user_source_ip": "52.215.237.185"
},
{
"created_time": "Mon, 16 Dec 2024 10:21:10 GMT",
"device_id": "d-c8b9-02aa",
"finish_time": "Mon, 16 Dec 2024 11:12:00 GMT",
"port_tunnel_id": "7d7a7462-cc5b-4f9a-b678-d3288475de02",
"remote_server_address": "d-c8b9-02aa-crwapf2u2ia.forwarding.connect.jfrog.io",
"remote_server_port": 44187,
"status": "closed",
"user_source_ip": "1.1.1.1"
},
{
"created_time": "Tue, 17 Dec 2024 10:13:17 GMT",
"device_id": "d-c8b9-02aa",
"finish_time": "Tue, 17 Dec 2024 12:13:17 GMT",
"port_tunnel_id": "7a4d651a-09a9-4d22-be60-4a33ad8a740c",
"remote_server_address": "d-c8b9-02aa-5aezyhyebus.forwarding.connect.jfrog.io",
"remote_server_port": 34610,
"status": "closed",
"user_source_ip": "52.215.237.185"
}
]
Gets information about all the port tunnels in a project. The port tunnels may be open or closed (also called finished). The status
returned may be one of the following:
Pending
: A new port tunnel that has not yet opened.Opened
: A port tunneling session currently active.Closed
: The user has ended the port tunneling session.Terminated
: The tunnel was closed, but not due to user request.
The project key of the relevant project in the account. An account can have multiple projects. If you don't know the project key, you can find it in the Settings of the web UI in the Projects tab.
The UUID that is the unique identifier of the port tunnel.
GET /api/v2/{project_key}/port_tunnel/{port_tunnel_id} HTTP/1.1
Host: api.connect.jfrog.io
Authorization: Bearer JWT
Accept: */*
OK
{
"created_time": "Mon, 16 Dec 2024 10:17:37 GMT",
"device_id": "d-c8b9-02aa",
"finish_time": "Mon, 16 Dec 2024 10:17:59 GMT",
"port_tunnel_id": "015900c8-3dae-43bd-8133-cb828470b73e",
"remote_server_address": "d-c8b9-02aa-agwb8q9wfem.forwarding.connect.jfrog.io",
"remote_server_port": 52466,
"status": "closed",
"user_source_ip": "52.215.237.185"
}
Ends a port tunneling session. You need to specify the project key and the port tunnel ID.
The project key of the relevant project in the account. An account can have multiple projects. If you don't know the project key, you can find it in the Settings of the web UI in the Projects tab.
The UUID that is the unique identifier of the port tunnel.
DELETE /api/v2/{project_key}/port_tunnel/{port_tunnel_id} HTTP/1.1
Host: api.connect.jfrog.io
Authorization: Bearer JWT
Accept: */*
No Content
No content
Was this helpful?