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

Prepare authentication when SSH agent is not running #23

Open
siloekse opened this issue Aug 31, 2021 · 2 comments
Open

Prepare authentication when SSH agent is not running #23

siloekse opened this issue Aug 31, 2021 · 2 comments

Comments

@siloekse
Copy link
Contributor

I came across an edgecase when the SSH agent is not running when prepare-authentication.sh is executed. The key/pub files are created, but they will of course not be added to the agent. The files will only be added to the agent if they don't exist beforehand, so in this case the user will have to add them manually after starting the SSH agent and run prepare-authentication.sh again to configure k8s.

@thomasjo
Copy link
Member

Yeah, good observation. I never found a truly reliable way to automate this, since it's highly dependent upon OS/distribution. Most user-friendly Linux distributions start ssh-agent during login, either using a systemd service or a short blurb in e.g. /etc/bashrc or similar.

Maybe we should detect if ssh-agent is running, and present the user with a helpful warning message if it isn't?

@siloekse
Copy link
Contributor Author

Yeah. A check/warning message with instructions on how to proceed should be sufficient. The agent might be stopped on purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants