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

Using server's authorized_keys #3

Open
OmgImAlexis opened this issue Jan 29, 2017 · 4 comments
Open

Using server's authorized_keys #3

OmgImAlexis opened this issue Jan 29, 2017 · 4 comments

Comments

@OmgImAlexis
Copy link

Is it possible to use the authorized_keys file from the current user instead of having a seperate on inside of the config dir?

For example ~/.ssh/authorized_keys

@deian
Copy link
Owner

deian commented Feb 1, 2017

Ah that should be easy enough to implement. It's been a while, but reading my own readme I think we create a keys/authorized_keys file anyway. You can hack this up to either symlink to ~/.ssh/authorized_keys or write a custom authorization implementation. I'd be happy to merge it in, but don't have the time to hack on this myself.

@OmgImAlexis
Copy link
Author

Okay I'll look into it.

@OmgImAlexis
Copy link
Author

Is there a way to add stuff to the config.json without the server overriding it on launch? I need to add something like this. That way if auto is true we use their system file if auto is false we use the path provided. The problem I've got is that every time I launch it config.json gets reset.

 "authorized_keys": {
     "auto": true,
     "path": "~/.ssh/authorized_keys"
 }

@deian
Copy link
Owner

deian commented Feb 6, 2017

Really? Are you passing in arguments that are then used to rewrite the json file?

I think adding another option to modify the sshd_config to not generate authorized_keys file is probably the simpler way to go. This would require changes to the sshd_config template file (in addition). You can temporarily hack this up manually by modifying the sshd_config file to point to your ~/.ssh/authorized_keys file too btw: https://github.com/deian/git-ssh-server/blob/master/templates/sshd_config#L13

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