All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Directadmin API add Public SSH RSA Key
So,
I have a reseller account and selling managed hosting. Every once in a while, I need to update my apps on all of my sub account. The update itself is just as simple as git pull
, the problem lies within on how to gain ssh access to the sub account.
I could easily add the public ssh key using the old fashioned way of login as the client, and add the key manually using mouse and keyboard. But I want to automate it using the API.
The thing is, in this particular case, I can't find a decent documentation about this API.
The closest thing to this is :
https://www.directadmin.com/features.php?id=2203
it says something about authorize, which I am sure what I am looking for, but I can't find the complete command. I mean, Where should I put the username of my sub account ?
Comments
isnt the answer but may be an option:
https://github.com/git-ftp/git-ftp
Nobody ?
Perhaps @DA_Mark can shed some light. At least make an example on the docs page. Is my only choice to reset all sub accounts password and login using password ?
Is there any other more elegant way to do it ?
It is late at night and I might not be thinking straight, but maybe using skeleton?
https://help.directadmin.com/item.php?id=278
With some shenanigans php scripting backdooring, perhaps it could work. but it only works for new account.
Directadmin has an API Specifically to do this. It's just the lack of documentation that is the problem.
I think that API might works, if it's called by the end user. But what about reseller. Perhaps I am missing something here.
Reseller is also a user, so, the same commands would work. Evolution sends everything to json endpoint, so, if you inspect it in your browser - it’d provide you the information needed. If you miss anything specifically - just let us know. Thank you.
So, where should I put my sub account username? Let's say I have user John under my reseller account. Where should I put John if I want to add my public rsa key into his account?
It's a user-level feature, meaning you need to do it when logged in as a user. There are several ways to do it:
1) API to login-as user (see login-as section in https://www.directadmin.com/api.html)
2) use end-user login key (or generate one-time one: https://www.directadmin.com/features.php?id=2463)
Thank you. Now, it makes sense.