React Termx.js with VncWebsocket

kimdonghyeon

New Member
Apr 10, 2025
1
0
1
I want to know how connect proxmox virtualmachine terminal to react xterm.js
{{base_url}}/api2/json/nodes/{{node}}/lxc/{{vmid}}/termproxy
i tried to get termproxy and i get a port , ticket
so i tried to connect websocket this url wss://{{myip}}:8006/api2/json/nodes/{{node}}/lxc/{{vmid}}/vncwebsocket?port={{socket}}&vncticket={{vncticket}}
but it doesnt work and i get this log from proxmox panel
-------------------------------------------------
failed waiting for client: timed out
TASK ERROR: command
'/usr/bin/termproxy 5900
--path /vms/100
--perm VM.Console
-- /usr/bin/ssh -e none
-o 'BatchMode=yes'
-o 'HostKeyAlias=node'
-o 'UserKnownHostsFile=/etc/pve/nodes/node/ssh_known_hosts'
-o 'GlobalKnownHostsFile=none'
-t root@111.111.111.111 /usr/bin/dtach
-A /var/run/dtach/vzctlconsole101
-r winch -z lxc-console
-n 101
-e -1'
failed: exit code 1
-------------------------------------------
ip information i changed for security

plz help me if you know how connect terminal to react front page and i want some sample code to connect