The remote service access feature includes remote connection through the SSH protocol, remote file management through the SFTP protocol, and other remote access services through the TCP protocol.
Link IoT Edge (LE) provides the remote service access feature by default.
Remote connection and remote file management are implemented based on the SSH protocol. They allow you to remotely log on to gateway devices, control the devices, and manage files. The username and password are the same username and password of the SSH service on the Docker images or the gateway.
- The runtime environment is configured for edge instances. For more information, see Set up environments.
- The remote access feature is enabled on the Gateways tab of the Instance Details page.
In the left-side navigation pane, choose View to the right of the target edge instance to go to the Instance Details page. On the Gateways tab, the remote access feature is enabled.. Click
- You must enable SSH for the gateway. The default port is 22. To enable the SSH service,
visit OpenSSH Server.
Note If the port is changed, you must log on to the gateway and manually modify the port parameter in the /linkedge/gateway/build/config/remote_terminal.json file. The gateway must support accessing the
127.0.0.1local loopback port.
Remote SSH terminal
- Log on to the IoT Platform console. In the left-side navigation pane, choose .
- Find the created instance, and click View.
- On the Instance Details page, select the Gateway tab, and click Remote SSH Terminal.
- In the dialog box, enter the username and password for the remote gateway, and click
After the connection is established, the following remote console page is displayed.Notice You are given advanced permissions when you remotely access the gateway. You can update, delete, and modify the information and files of various gateway devices. Therefore, use this feature with caution.
- Optional. You can remotely manage files from the remote console.
You can browse and create directories, and upload and download files remotely. The following are the descriptions of the features.
Action Description Refresh Refresh the remote file directory. Create a directory Click Create Directory. In the dialog box that appears, enter the Directory Name and click OK to add a new remote file directory.Note The Directory Name must be at most 64 characters in length and can contain letters and digits. Upload a file Click Upload File. In the dialog box that appears, click Upload. After the file is uploaded, click OK to upload the file to the remote directory. Download a file Click Download. You can download a remote file to the local directory. Delete a file Click Delete to delete a remote file.Notice You cannot recover deleted files. Proceed with caution.
Share remote services
- In the Instance Details page, select the Gateways tab. Click Share Remote SSH Terminal to the right of the gateway name.
- In the dialog box that appears, click Remote Sharing.
- In the Share Remote SSH Terminal dialog box, the remote sharing link and password are displayed in the dialog box.
You can click Copy Link and Password to copy the information and share the remote service with others.
- After the service is shared for 24 hours, the sharing is automatically disabled. Users who are shared with the remote service cannot log on to the remote service again. However, the system will not terminate existing logon sessions. To terminate existing sessions, select the Gateways tab and turn off Remote Access.
- You can click Reset Password to obtain a new password. After the password is reset, other users cannot use the old password to log on to the remote service again. Users that have logged onto the service can still access the service, but the access is revoked if the users log out.
- If you have obtained the link of the shared remote service, you can log on to the
device and access the remote service using the following steps.
- Open the shared link in the browser and enter the shared password.
- Enter the device username and password provided by the user who shared the service.
- After you log on to the device, you can start using the remote service.