Remote Connection view
Kvaser CanKing normally controls the CanKingService running on the same machine. The Remote Connection view, opened from the vertical tool bar to the left of the application (or the Remote Connection button on the startup screen), instead connects the application to a CanKingService running on another machine over the network. This makes it possible to control interfaces attached to a remote or headless computer, and to browse and transfer files on that computer, directly from Kvaser CanKing.
Note
The CanKingService on the remote machine must first be configured to accept remote connections, see Setting up CanKingService for remote access below.
Connecting
Open the Remote Connection view
Enter the Service URL of the remote CanKingService, for example
https://myserver.example.com:36701. Previously used URLs are remembered and offered as suggestionsEnter the API Key configured on the remote service
Click Connect
A status indicator shows the current connection state:
Red - Not connected
Orange - Connecting
Green - Connected
While connected, the Remote Connection icon in the vertical tool bar and the service icon in the title bar turn green, and a banner with the remote URL is shown in the title bar. Click Disconnect to return to using the local CanKingService.
Warning
Only one CanKingService, local or remote, can be controlled at a time. Connecting to a remote service replaces the connection to the local one until disconnected.
Remote File System
Once connected, the Remote File System browser shows the files and folders on the remote machine, rooted at the directory the service was configured with. It can be used to:
Upload - Copy selected files from the browser to the local machine’s file system
Download to Service - Save files to the remote machine’s file system
Create Folder - Create a new folder in the current directory on the remote machine
Delete - Remove selected files or folders from the remote machine
Files can also be dragged and dropped between the browser and the operating system, in either direction, to upload or download them.
Setting up CanKingService for remote access
Remote access is disabled by default and must be enabled on the machine that runs CanKingService before a client can connect to it. This requires a TLS certificate, so that traffic between the client and the service is encrypted, and an API key, which acts as a shared secret between the service and its clients.
The recommended way to configure this is with the ck remote commands, run in the terminal of the CanKingService that should accept remote connections:
Generate a certificate for the service, replacing
myserver.example.comwith the machine’s hostname or IP address:ck remote generate-cert myserver.example.comThis creates a private certificate (.pfx), which stays on the server, and a public certificate (.pem) that needs to be copied to each client machine.
Enable remote connections, providing the certificate and a strong API key:
ck remote enable --cert-path /path/to/myserver.example.com.pfx --service-api-key a-strong-secretCanKingService restarts automatically and is now reachable over the network on the configured port (default 36701).
Copy the public certificate (.pem file) to every client machine that needs to connect, and make a note of the API key and port number.
On the client machine running Kvaser CanKing:
Trust the server’s public certificate, either by copying it to CanKing’s certificate folder (
%ProgramData%\Kvaser\CanKing\ca-certificateson Windows,/usr/share/Kvaser/CanKing/ca-certificateson Linux), or by installing it as a trusted root certificate in the operating systemOpen the Remote Connection view, enter the Service URL (
https://<hostname>:<port>) and the API Key, and click Connect
To turn remote access off again, run the following command on the server:
ck remote disable
Note
This section covers the minimal setup for a first connection. For advanced configuration, including firewall rules, running CanKingService as a background service, manually issued or CA-signed certificates, and troubleshooting, see the separate Remote Access — Quick Setup Guide and Remote Access for CanKingService guides.
Security recommendations
Do not use a self-signed certificate for a service exposed outside a trusted network; use one issued by a certificate authority instead
Keep the API key secret and rotate it periodically
If the service is reachable from the public internet, place it behind a reverse proxy or load balancer that provides TLS termination and protection against denial-of-service attacks