Skip to content

colab ssh doesn't work if identity isn't added to ssh-agent #233

Closed

Description

@sethtroisi
$ ssh-add ~/.ssh/id_ed25519
Enter passphrase for /home/once/.ssh/id_ed25519: 
Identity added: /home/once/.ssh/id_ed25519 (once@once)

$ uv run colab ssh
[colab] Using unique session 'a9683e'.
/content# exit
logout

$ ssh-agent -k; eval "$(ssh-agent -s)"

$ uv run colab ssh
[colab] Using unique session 'a9683e'.
root@colab-runtime: Permission denied (publickey).

$ uv run colab ssh -i ~/.ssh/id_ed25519.pub
[colab] Using unique session 'a9683e'.
Enter passphrase for key '/home/once/.ssh/id_ed25519': 
/content# 

before #225 this breaks also on passing identity file

$ uv run colab ssh -i ~/.ssh/id_ed25519
[colab] Using unique session 'a9683e'.
[colab] failed to derive public key from /home/once/.ssh/id_ed25519: Command '['ssh-keygen', '-y', '-f', '/home/once/.ssh/id_ed25519']' returned non-zero exit status 255.

Activity

  1. sethtroisi commented on Nov 10, 2026

    @sethtroisi
    CollaboratorAuthor

    I debugged with

    ssh -v -o "ProxyCommand=$(pwd)/.venv/bin/python -m colab_cli.cli ssh --proxy-mode -s a9683e --colab-internal-mode interactive" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -t root@colab-runtime
    

    And noticed it was only offering my id_rsa key which happened because I have a ~/.ssh/config which only lists one IdentityFile. I added IdentityFile ~/.ssh/id_ed25519 to ~/.ssh/config and it works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions