Managing the Target Server
Prerequisites
- You have installed and deployed the Kunpeng DevKit.
- You have installed the Kunpeng DevKit plugin and logged in to the Kunpeng DevKit using the plugin.
Procedure
- Target server management is not available in WebUI mode.
- In the VS Code, the Remember password option is displayed when you add a target server. However, to ensure your account security, do not select Remember password when logging in using a public network or public computer.
- In the upper right corner of the page, choose
> General Settings > Target Server Management. The target server management page is displayed. - Click Add Target Server. The window shown in Figure 1 is displayed. Set the parameters by referring to Table 1. Then click OK.
Table 1 Parameters for adding a target server Parameter
Description
IP Address
IP address of the target server to be connected.
Server Alias
Alias of the target server to be connected. The default value is the IP address.
SSH Port
SSH port of the target server to be connected.
Authentication Mode
The options are:
- Password
- Public and private keys
Private Key
Import the private key file.
NOTE:- A key pair can be generated by running the following command: ssh-keygen [-b bits] [-t dsa | ecdsa | ed25519 | rsa] [-C comment] [-f output_keyfile]
If the target server OS is openEuler 22.03, you need to use another secure encryption algorithm, such as ssh-keygen -b 521 -t ecdsa -f ${plugin_path}\\rsa\\ssh -N "${random_passphrase}", to generate a public-private key pair.
If the target server OS is openEuler 22.03-LTS-SP1, you need to use another secure encryption algorithm, such as ssh-keygen -t ed25519 -f ${plugin_path}\\ed25519\\ssh -N "${random_passphrase}, to generate a public-private key pair.
For other target server OSs, you need to use another secure encryption algorithm, such as ssh-keygen -b 3072 -t rsa -f ${plugin_path}\\rsa\\ssh -N "${random_passphrase}", to generate a public-private key pair.
- In the tip for Public and private keys, you can click Copy to copy the command for generating a key pair.
(Optional) Passphrase
Enter the passphrase for generating the key.
Upload a Public Key
- Yes
- No
NOTE:This parameter is available when Public and private keys is selected.
If you select Yes, you need to specify the public key file and SSH password. If you select No, ensure that the public key has been configured on the server.
Public Key
Import the public key file.
NOTE:A key pair can be generated by running the following command: ssh-keygen [-b bits] [-t dsa | ecdsa | ed25519 | rsa] [-C comment] [-f output_keyfile]
If the target server OS is openEuler 22.03, you need to use another secure encryption algorithm, such as ssh-keygen -b 521 -t ecdsa -f ${plugin_path}\\rsa\\ssh -N "${random_passphrase}", to generate a public-private key pair.
If the target server OS is openEuler 22.03-LTS-SP1, you need to use another secure encryption algorithm, such as ssh-keygen -t ed25519 -f ${plugin_path}\\ed25519\\ssh -N "${random_passphrase}, to generate a public-private key pair.
For other target server OSs, you need to use another secure encryption algorithm, such as ssh-keygen -b 3072 -t rsa -f ${plugin_path}\\rsa\\ssh -N "${random_passphrase}", to generate a public-private key pair.
OS Username
SSH user name of the target server to be connected.
OS User Password
Enter the SSH password of the target server.
Workspace
Path for synchronizing code to the server during remote compilation and debugging. Set this parameter properly. The default path is ~/workspace.
- When a message is displayed indicating that the host fingerprint reliability cannot be determined, click Yes to go to the next step until the target server is added.
- (Optional) Click Configure JSON File to add a server or modify a configured server by configuring JSON file.
- You can click Modify, Login, or Delete in the operation column on the right of the target server after the target server is added.
