Skip to content

SSH Agent Forwarding #120

Closed
Closed

Description

@dt

Would be great to be able to forward local SSH agents. Seems to ignore ForwardAgent yes in ~/.ssh/config

Activity

  1. jlynn commented on Apr 11, 2012

    @jlynn

    👍 I can't use mosh for this very reason. I need to be able to connect to other machines in the environment I'm accessing plus use my ssh key to push/pull code from github.

  2. peterjeremy commented on Apr 11, 2012

    @peterjeremy
    Contributor

    This requires tunnelling the agent request from the server back to the client.

  3. phmarek commented on Apr 11, 2012

    @phmarek

    I'd be interested in this feature, too.

  4. dt commented on Apr 11, 2012

    @dt
    Author

    If #41 ends up being resolved be adding tunnels for arbitrary octet streams, agent forwarding should be trivial to add on top of that.

  5. thrillcall commented on Apr 12, 2012

    @thrillcall

    +1 for being able to ForwardAgent. In our case also critical for getting code to/from GitHub on remote servers.

  6. dbanck commented on Apr 12, 2012

    @dbanck

    +1 I need the agent for sudo authentication.

  7. clneagu commented on Apr 13, 2012

    @clneagu

    +1 mostly for github

  8. avleen commented on Apr 13, 2012

    @avleen

    +1 also!

  9. stianeikeland commented on Apr 15, 2012

    @stianeikeland

    👍 .. this would be very useful

  10. nostra commented on Apr 18, 2012

    @nostra

    +1

  11. plathrop commented on Apr 18, 2012

    @plathrop

    +1

  12. plathrop commented on Apr 18, 2012

    @plathrop

    Hard to resist the urge to say nothing but '+1' to @Mkaysi's comment...

  13. keithw commented on Apr 18, 2012

    @keithw
    Member

    All right, folks, the message has been heard loud and clear! We will put this on the roadmap for a release, probably the one immediately after 1.2. No need to keep +1ing - we will do it.

  14. Hidendra commented on Jul 27, 2012

    @Hidendra

    Any word on if this is still planned for 1.2 or near/after 1.3?

  15. chekhovs1 commented on Aug 20, 2012

    @chekhovs1

    +1 from me. I naively thought that this was implemented and after building mosh at the server systems and running it, realized that this is not quite ready yet. Any updates on the timeline?

  16. 183 remaining items

  17. sbz commented on Mar 6, 2018

    @sbz

    @keithw Ok thank for your reply and clarification. I will try Guardian Agent!

    @rinne I will checkout your branch, looks like the good commit to watch is rinne/mosh@dfa183d

  18. tnguyen14 commented on Mar 6, 2018

    @tnguyen14

    @keithw appreciate all the work you and your team put into mosh and Guardian Agent. I think it's great that there's a more secure option for agent forwarding. However, I agree with @rinne that wide adoption is rather unlikely, at least in the short term.

    Now that there's a supposedly better solution for agent forwarding, I think mosh should also add support for the builtin agent forwarding, and let the users decide which one they want to use. I think it's detrimental to mosh to not merge #696. Clearly there is a lot of interest and support for that feature. Let the users decide which alternatives they prefer.

  19. webbp commented on Mar 31, 2018

    @webbp

    I would like this feature, too, but a <30 second workaround for connecting to a remote server and then accessing github is to just generate a new ssh key and add it to github, e.g.,
    ssh-keygen -t rsa -b 4096 -C "[email protected]"
    hit return several times
    cat ~/.ssh/id_rsa.pub
    copy it, go here: https://github.com/settings/ssh/new, paste

  20. rdnetto commented on Mar 31, 2018

    @rdnetto

    From the README:

    Q: Is Guardian Agent secure?

    A: Guardian Agent is a beta that was first released for beta testing in October 2017. It has not accumulated enough testing and scrutiny to make claims that the implementation is bulletproof.

    IMO, this is a pretty strong signal that we should not use Guardian Agent for security-conscious environments, which are precisely the ones where we'd prefer agent forwarding over simply storing a key on the remote host.

    I appreciate the desire to avoid the issues associated with agent forwarding, but until Guardian Agent is considered stable and secure, I don't think it's a viable alternative.

  21. keithw commented on Mar 31, 2018

    @keithw
    Member

    :-) We had a pretty similar disclaimer for the first few years of Mosh, and the results speak for themselves. There's no point in boasting about security before we have a track record. But I think the idea is that if you all try Guardian Agent and the feedback is good, we'll integrate it more tightly into Mosh. That sort of solves the problem of adoption.

  22. keithw commented on Mar 31, 2018

    @keithw
    Member

    In general, I know it's frustrating to have a PR sitting around and not get merged, but it's not just a question of the implementation -- we really don't want to complicate the protocol in a way that we then have to support forever going forward (especially by bolting it into the object that gets synchronized by SSP, which is unfortunately a bit of a kludge -- not Timo's fault, it's just that SSP is not very good at this use case).

    If you look at where the security holes come from in OpenSSH and OpenSSL, it's largely from added complexity that wasn't really necessary. Mosh has never had a significant security hole (yet -- knock on wood) and I don't think that's entirely luck -- it also comes from saying no to things that add complexity to the protocol in a way that makes it harder to reason about.

  23. rinne commented on Apr 1, 2018

    @rinne
    Contributor

    @keithw, just please mark the protobuf message numbers used in agent forwarding patch as reserved in upstream master, so they are not accidentally recycled later. Apart from that, I'm pretty much beyond caring.

  24. keithw commented on Apr 4, 2018

    @keithw
    Member

    Sounds pretty reasonable -- you want Mosh to keep tag 8 (your oob) reserved in TransportBuffers::Instruction?

  25. rinne commented on Apr 5, 2018

    @rinne
    Contributor

    @keithw "Sounds pretty reasonable -- you want Mosh to keep tag 8 (your oob) reserved in TransportBuffers::Instruction?"

    Yes, please. As far as I understand, that should be enough to never break interoperability with agent enabled client vs non-enabled server and vice versa.

  26. xhalo32 commented on Aug 2, 2018

    @xhalo32

    +1 add agent forwarding

  27. zviratko commented on Sep 3, 2018

    @zviratko

    This discussion is a bit ridiculous.
    It's true that enabling ssh-agent (without confirmation) is a security risk and could be considered bad practice.
    But tons of people are doing it, using it and without it, mosh is usable just for their IRC screen hosts (like me).
    To install it in an enterprise and use it to manage your servers, you usually need ssh-agent support because sooner or later you'll hit a script that needs it (for git, automation, whatever).

    mosh is either a supposed SSH replacement intended for use instead of SSH everywhere possible (in which case it will need to support all the silly stuff as well) or it is just a wrapper that makes roaming easier for few hosts (in which case you might argue improving security is a thing).
    I say let the users decide.
    I believe mosh security is on-par if not better than SSH with all it's legacy bloat, which should be one more reason to make it possible for people to actually use it as SSH replacement = ssh-agent is a prerequisite of that (and for the record I believe port forwarding as well)

  28. keithw commented on Sep 3, 2018

    @keithw
    Member

    Hi folks -- I'm going to lock the conversation here because it doesn't seem to be productive anymore. We are not making the protocol changes proposed in Timo Rinne's pull request, for the reasons we've explained earlier here: we really don't want to complicate the protocol in a way that we then have to support forever going forward (especially by bolting it into the object that gets synchronized by SSP, which is unfortunately a bit of a kludge -- not Timo's fault, it's just that SSP is not very good at this use case).

    If you look at where the security holes come from in OpenSSH and OpenSSL, it's largely from added complexity that wasn't really necessary. Mosh has never had a significant security hole (yet -- knock on wood) and I don't think that's entirely luck -- it also comes from saying no to things that add complexity to the protocol in a way that makes it harder to reason about.

    If you want ssh-agent forwarding with Mosh, please use Guardian Agent and provide feedback if you have it: https://github.com/StanfordSNR/guardian-agent

    It works and I use it every day! If feedback is good, we may consider integrating Guardian Agent more closely into a future version of Mosh. It's true that Guardian Agent is newer and less-tested software, but, so was Mosh when it was younger. The only way it will be more-tested is if more people use it. And, we think it is a lot more secure than "uncontrolled" ssh-agent forwarding.

  29. locked and limited conversation to collaborators on Sep 3, 2018
  30. removed this from the mosh-future milestone on Jan 22, 2023
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions