Skip to content

Bug: Hardcoded SSH User in runpodctl Prevents Support for Non-Root Users #179

@andylizf

Description

@andylizf

Description:

In the runpodctl codebase, the SSH client configuration is hardcoded to use the root user:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions