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

Can private_key be used as a property for a server? #1286

Open
sdondley opened this issue Apr 8, 2020 · 1 comment
Open

Can private_key be used as a property for a server? #1286

sdondley opened this issue Apr 8, 2020 · 1 comment

Comments

@sdondley
Copy link
Contributor

sdondley commented Apr 8, 2020

The documentation on configuring a server is thin.

I have this in Rexfile:

group "lightsails", "ilwu_big" => { user => 'my_user', private_key => '/path/to/key.pem' };

task 'uptime', 'ilwu_big', sub {
  say run 'uptime';
};

However, authentication fails. If I add the following above the task, however:

private_key '/path/to/key.pem';

The task runs.

@ferki
Copy link
Member

ferki commented Apr 9, 2020

Thanks for the report!

Hmm, when I first started to reply, I noticed that there are at least the following factors in play here:

  • I'd expect the use_server_auth feature flag and/or some newer versioned feature flag would be needed for that notation to work
  • the task says the code is tied to the host named ilwu_big, and not to the group named lightsails (that would be task 'uptime', group => 'lightsails', sub {...};)
  • I would recommend auth for to override per-task or per-group authentication details

But then I could not make this use case for the private keys working in my quick local tests, so I think it's best to investigate it further as a potential bug.

To avoid duplication, I will cross-link this with the Rex Users group thread about the same topic, and only follow it here.

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

2 participants