Question

troubleshooting SSH agent forwarding with doctl compute ssh <droplet-id> --ssh-agent-forwarding

Hello! I’m having trouble getting doctl compute ssh <droplet-id> --ssh-agent-forwarding to work. I’m trying to forward my connection from my local ssh-agent to a droplet, so that I can use my GitHub credentials on that droplet, but it doesn’t succeed. If I try plain old SSH with ssh -A root@<droplet-ip-address> then it works fine. What sorts of things could contribute to this problem? Thanks! P.S. Here’s a screencast illustrating it:

https://asciinema.org/a/R7a4S3w7dd3qfeL4unpSPw6ik


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
February 2, 2025

Hey David!

First off, that asciinema is awesome! Super helpful for understanding the issue!

I think that, since SSH agent forwarding works fine with ssh -A but not with doctl compute ssh --ssh-agent-forwarding, this looks like it might be a bug in doctl rather than a misconfiguration on your end.

I’d recommend opening an issue on the doctl GitHub repo so the DigitalOcean team can investigate: 🔗 https://github.com/digitalocean/doctl/issues/

Make sure to include the asciinema video in the issue as well! Once you submit the issue, feel free to share it here as well and I can try to forward it internally!

- Bobby

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.