cPanel/JethostSsh
cPanel module

JethostSsh

1 functions, invoked through the cpanel_uapi tool.

Generate an SSH deploy key for a git repository used by deploy_private_repo → SSH, ssh, KnownHosts

scope cpanel:uapideploy
Call any function with cpanel_uapi(service_id, module="JethostSsh", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.

generate_deploy_key POST mutating#

Generate an SSH deploy key for a git repository.

Generates (or returns the existing) SSH keypair for service_id/repo_url. The PRIVATE key is installed on the account plus an ~/.ssh/config stanza aliased with an alias derived from the repo URL, returned as ssh_clone_alias (Host <alias> / IdentityFile <private key> / IdentitiesOnly yes); nothing is written to authorized_keys (that file governs inbound SSH, not outbound git-clone auth). Only the PUBLIC key is returned, for the caller to add as a deploy key on the repository host (GitHub/GitLab/Bitbucket). deploy_private_repo takes the real repository URL and derives/applies the alias internally; ssh_clone_alias is only needed when registering a repo directly via VersionControl::create, bypassing deploy_private_repo.

service_idintegerRequired
The hosting service ID the deploy key is for. Obtain it via list_services.
repo_urlstringRequired
The repository URL for which to generate a deploy key.