ssh key support for create_remote_user_transfer_session
Open Discussion
WHM API create_remote_root_transfer_session supports ssh keys and passwords
vs
WHM API create_remote_user_transfer_session only supports passwords
Use case:
This would be to automate account migrations between servers without having to grant those servers root access to each other or force a password reset for the cPanel user. The WHM API requests would be posted by key server which knows the .accesshash for the source and destination servers. Only that key server should have root access.
The idea is to basically use the functions like so. All API post requests are authenticated using the .accesshash
- new server: importsshkey (WHM API 1) # place a private key on root
- old server: SSH::importkey (cPanel API 2) # place the public key on the cpanel user
- old server: SSH::authkey (cPanel API 2) # authorize it to the cpanel user, not root
- new server: create_remote_user_transfer_session (WHM API 1) # since we're using keys, we don't need to reset the cPanel user's password
- new server: start_transfer_session (WHM API 1) # and so on with the move process
Replies have been locked on this page!