Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please expose the ssh user in list-sessions #608

Open
evgeni opened this issue Sep 13, 2022 · 0 comments
Open

please expose the ssh user in list-sessions #608

evgeni opened this issue Sep 13, 2022 · 0 comments

Comments

@evgeni
Copy link

evgeni commented Sep 13, 2022

When I do a duffy client list-sessions, I get my sessions and my nodes, but it doesn't tell me which user I shall use for SSH.

Looking at

SSH_REMOTE_CONTEXTUALIZE_CMD = "cat - >> ~root/.ssh/authorized_keys"
I assume it's always root, but it would be nice if that would be part of the API reply:

      "nodes": [
        {
          "hostname": "n27-25-177.pool.ci.centos.org",
          "ipaddr": "172.27.25.177",
          "comment": null,
          "pool": "metal-ec2-c5n-centos-8s-x86_64",
          "reusable": false,
          "data": {
            "provision": {
              "ec2_instance_id": "i-0ad3ef244d3e595db",
              "ec2_instance_type": "c5n.metal",
              "hostname": "n27-25-177.pool.ci.centos.org",
              "ipaddr": "172.27.25.177",
              "public_hostname": "ec2-54-144-113-35.compute-1.amazonaws.com",
              "public_ipaddress": "54.144.113.35",
              "ssh_user": "root" # added by @evgeni
            },
            "nodes_spec": {
              "quantity": 1,
              "pool": "metal-ec2-c5n-centos-8s-x86_64"
            }
          },
          "id": 9208,
          "state": "deployed"
        }
      ]
evgeni added a commit to evgeni/evgeni.duffy that referenced this issue Sep 13, 2022
while the user is currently not exposed via the api (see [1]), it's
always `root` and inventory consumers should not have to set this
themself

[1] CentOS/duffy#608
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant