[FEATURE] Support SSH Config Host Aliases in Teleport Command
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Feature Request: Support SSH Config Host Aliases in Teleport Command
Summary
The claude --teleport command fails to recognize git repositories when the remote URL uses an SSH config host alias instead of the standard github.com hostname.
Current Behavior
When running claude --teleport <session_id> from a valid checkout of a repository, the command fails with:
You must run claude --teleport session_xxx from a checkout of Revarta/ih3
This occurs when the git remote is configured using an SSH config alias:
$ git remote -v
origin git@github.com-revarta:Revarta/ih3 (fetch)
origin git@github.com-revarta:Revarta/ih3 (push)
Expected Behavior
The teleport command should recognize that git@github.com-revarta:Revarta/ih3 refers to the same repository as git@github.com:Revarta/ih3 and allow the teleport to proceed.
Use Case
Many developers who work with multiple GitHub accounts (personal and work) use SSH config host aliases to manage different SSH keys. This is a common and recommended pattern:
~/.ssh/config
Host github.com-revarta
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_revarta
Host github.com-personal
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_personal
This allows cloning with:
git clone git@github.com-revarta:Revarta/ih3
Suggested Solution
When validating the repository match for teleport, consider:
Parse the actual hostname from SSH config: Resolve the SSH alias to its actual HostName value
Normalize git URLs before comparison: Extract the repository path (Revarta/ih3) and compare that regardless of the host format
Support common patterns: Recognize github.com-* as likely GitHub aliases
Workaround Attempted
User tried temporarily changing the remote URL but the error persisted:
git remote set-url origin git@github.com:Revarta/ih3
Environment
Operating system: Linux
Git remote format: SSH with config alias
Repository: Revarta/ih3
Impact
This prevents users with multi-account SSH configurations from using the teleport feature, which is particularly common among:
Developers with separate work/personal GitHub accounts
Consultants working across multiple organizations
Open source contributors who separate identities
Proposed Solution
Support SSH Config Host Aliases in Teleport Command
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗