Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Could you please explain why ssh-agent would only print the shell commands - rather than actually running those commands. That just does not seem like a logical thing for ssh-agent to do. Commented Aug 2, 2022 at 7:34
  • 2
    I'm not an expert but I think it has something to do with the ability of programs to affect the shell. I think setting environment (and shell) variables is something only the shell can do itself or by using export. Since ssh-agent can't set the variables for you, the next best thing is to show you how. Commented Aug 3, 2022 at 10:47
  • Just a small follow up on this, each process inherits its environment from it's parent, and can only add/change variables in its own environment not the parent. (we can use source as a way around this with scripts.) Commented May 27, 2024 at 11:21