-
Notifications
You must be signed in to change notification settings - Fork 58
Bug: Hardcoded SSH User in runpodctl Prevents Support for Non-Root Users #179
Description
Description:
In the runpodctl codebase, the SSH client configuration is hardcoded to use the root user:
Lines 293 to 298 in b508558
| config := &ssh.ClientConfig{ | |
| User: "root", | |
| Auth: []ssh.AuthMethod{ | |
| ssh.PublicKeys(privateKey), | |
| }, | |
| HostKeyCallback: ssh.InsecureIgnoreHostKey(), |
This approach causes issues when dealing with Docker images or environments that are configured to run as a non-root user by default. SSH attempts will fail with permission errors when the container does not allow root access.
Proposed Fix:
Instead of hardcoding the User: "root", it would be better to dynamically retrieving the default user from the API if available This change would improve flexibility and compatibility with a wider range of container setups.
Related Issue:
This problem is also related to runpod/runpod-python#399. Integrating such an API with runpodctl would allow for dynamic SSH user configuration, resolving the non-root user problem seamlessly.