Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Heuristic:1jehuang Jcode Credential Portability

From Leeroopedia
Knowledge Sources
Domains Security, DevTools
Last Updated 2026-10-18 00:00 GMT

Overview

Local jcode credentials can be uploaded to a remote SSH host via /login --import-local, avoiding a second browser-based OAuth flow on the remote machine.

Description

The Credential_Portability heuristic allows local jcode authentication credentials (~/.jcode/auth.json and provider credentials) to be imported to a remote SSH host. Inside the native SSH TUI, the /login --import-local command opens a picker showing available local logins (e.g., OpenAI, Claude). After explicit user confirmation, the credentials are uploaded to the remote host. This avoids requiring a second browser-based OAuth login on the remote machine, which may not have a browser or may be behind a firewall. The import does not read local credentials while the picker is open, and requires explicit confirmation.

Usage

Use this heuristic when connecting to a remote jcode daemon over SSH for the first time. Instead of running a full OAuth flow on the remote host, import local credentials with /login --import-local. This is particularly useful for headless remote servers or firewalled environments where browser-based OAuth is impractical.

The Insight (Rule of Thumb)

  • Action: Run /login --import-local inside the SSH-connected TUI to upload local credentials to the remote host.
  • Value: Direct command form: /login --import-local openai or /login --import-local claude.
  • Trade-off: Credentials are copied to the remote host, which must be trusted; the import requires explicit confirmation.
  • Compatibility: Neither route reads local credentials while the picker is open; both lead to the same explicit confirmation.

Reasoning

On headless or firewalled remote servers, browser-based OAuth is often impractical or impossible. By importing credentials from the local machine, the user avoids the friction of setting up port forwarding for OAuth or installing a browser on the remote host. The explicit confirmation step ensures credentials are not silently leaked to untrusted remote hosts.

Code Evidence

Import flow from docs/NATIVE_SSH.md:69-80:

### One-time import of a local login

To avoid another browser login on a trusted SSH host, open `/login` **inside the
native SSH TUI** and choose an **Import local … login** row. `/login --import-local`
opens a smaller picker containing just those two import choices. Both routes lead
to the same explicit confirmation, and neither reads local credentials while
the picker is open. Direct commands remain available:

```text
/login --import-local openai
/login --import-local claude
```

Read the destination-host warning, choose **Yes**, and press Enter.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment