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

Add new API to add ssh key to a specific user #2797

Closed
dilshat opened this issue Jan 30, 2019 · 4 comments
Closed

Add new API to add ssh key to a specific user #2797

dilshat opened this issue Jan 30, 2019 · 4 comments

Comments

@dilshat
Copy link
Member

dilshat commented Jan 30, 2019

We need to provide method to add an ssh key to authorized keys file of a specified user inside a container

@akarasulu
Copy link
Contributor

What are the existing API's?
What are their signatures, and semantics?
Who calls them and who executes them?

@dilshat
Copy link
Member Author

dilshat commented Jan 30, 2019

SshKeys io.subutai.common.peer.Peer#readOrCreateSshKeysForEnvironment - creates ssh keys inside all containers and returns them to caller

io.subutai.common.peer.Peer#configureSshInEnvironment( EnvironmentId environmentId, SshKeys sshKeys )
adds specified ssh keys to all containers within environment

io.subutai.common.peer.Peer#addToAuthorizedKeys( EnvironmentId environmentId, String sshPublicKey ) adds a specified ssh key to all containers within environment

these methods are called by Bazaar module (or environment manager in case of local environments) during environment build

@samsonbek
Copy link
Member

adds specified ssh keys to all containers within environment

we need API to add ssh keys only to several chosen containers.

@dilshat dilshat added this to the 8.3.0 milestone Jan 31, 2019
@dilshat
Copy link
Member Author

dilshat commented Feb 4, 2019

Check user existence id -u {username}
Create user with home directory useradd -m {username}

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

3 participants