shuiqingliu opened a new pull request, #10390: URL: https://github.com/apache/inlong/pull/10390
Fixes #10261 ### Motivation Implement SSH key-based authentication when installing the agent via SSH. The implementation plan is as follows: 1. On the dashboard node, add an option to distinguish between username/password and SSH key authentication when selecting the SSH method. For SSH key authentication, the user also needs to input the username, port, and IP information. 2. When the user selects SSH key authentication, the dashboard actively calls the SSH key retrieval interface. 3. If the manager node does not have an SSH key pair, it calls ssh-keygen to generate one. If a key pair already exists, it is returned directly. 4. When executing the installation command, if no user password is provided, the installation defaults to using SSH key authentication. ### Modifications * Added an SSH key generation interface. * Modified the remote command execution method to support SSH key authentication. * When the user authenticates via SSH key, the password is empty, so the remote command execution method was modified to support nullable parameters. ### Verifying this change *(Please pick either of the following options)* - [ ] This change is a trivial rework/code cleanup without any test coverage. - [x] This change is already covered by existing tests, such as: * Tested SSH key generation; the key was generated successfully. <img width="1845" alt="image" src="https://github.com/apache/inlong/assets/4103971/86f54fe6-86bf-408a-8ca5-324abf6948ec"> * Tested command execution via SSH key; the execution was successful. - [ ] This change added tests and can be verified as follows: ### Documentation - Does this pull request introduce a new feature? yes - If yes, how is the feature documented? (not documented) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org