def METHOD_NAME(credential, ssh_key):
    """Generate an ssh private keyfile for the ssh key content specified."""
    ssh_pkey_dir = Path(tempfile.gettempdir()) / GEN_KEYFILES_DIRECTORY
    ssh_pkey_dir.mkdir(parents=True, exist_ok=True)
    private_keyfile_path = Path(
        tempfile.NamedTemporaryFile(
            prefix=f"{GEN_KEYFILE_PREFIX}_{credential.get('id')}_",
            dir=ssh_pkey_dir,
        ).name
    )
    private_keyfile_path.write_text(f"{ssh_key}\n")
    private_keyfile_path.chmod(0o600)
    return str(private_keyfile_path)