reconquest / orgalorg

Parallel SSH commands runner and file synchronization tool
MIT License
887 stars 51 forks source link

Support for ssh-agent and forwarding? #12

Open rupor-github opened 8 years ago

rupor-github commented 8 years ago

Hi, are there any plans to support this?

seletskiy commented 8 years ago

@rupor-github: Hi! Not yet. It was already mentioned in the #10. I'l glad to merge PR with ssh-agent support.

rupor-github commented 8 years ago

Here you are: https://github.com/reconquest/orgalorg/pull/14

rupor-github commented 8 years ago

@seletskiy did you have a chance to look at my pool requests (both runcmd and orgalorg)?

seletskiy commented 8 years ago

@rupor-github: Sorry, I was little bit of out context lately. I will take a close look soon. Thanks for poking me.

linuxbsdfreak commented 6 years ago

@seletskiy - Do you know if this can be merged? I am using the orgalorg tool and would like to use the ssh-agent withougt entering the passphrase everytime.

prologic commented 5 years ago

Looks like the PR never got merged. What happening here?

seletskiy commented 5 years ago

@prologic it seems that runcmd library repo was lost along with required PR, so author closed PR.

We need to restore this feature in runcmd first.

prologic commented 5 years ago

This was some years ago... Is there still interest in adding this feature? I'm not seeing much evidence of activity on this project of late... Do you still actively maintain/develop it?

seletskiy commented 5 years ago

@prologic: well, I do not use orgalorg right now, but that doesn't mean, that project is dead. If someone will add agent functionality back in runcmd then I will gladly merge PR #14.

kovetskiy commented 5 years ago

@prologic yes, I use the program on an everyday basis, the thing about it is that it just works fine.

tbellembois commented 5 years ago

I undig a very old topic.

Is there any possibility to use the https://godoc.org/golang.org/x/crypto/ssh library instead of runcmd ? runcmd does not look to be maintained.

kovetskiy commented 5 years ago

@tbellembois what point do you see in it? The runcmd package doesn't do anything except wrapping golang.org/x/crypto/ssh, providing an interface which we use in orgalorg itself as abstraction layer for Local/Remote runners.

kovetskiy commented 5 years ago

@tbellembois nevermind, I've already forked runcmd and reworked it a bit.

Also, I've added support of ssh-agent here: https://github.com/reconquest/orgalorg/commit/ed1e994d72bbd39ea729c21bbd6cbb7294ab6c36

seletskiy commented 5 years ago

flash @kovetskiy

tbellembois commented 5 years ago

Orgalorg keeps asking for my ssh keys. Changing the main.go file into (line 707):

    if os.Getenv("SSH_AUTH_SOCK") != "" {
        sock, err := net.Dial("unix", os.Getenv("SSH_AUTH_SOCK"))
        if err != nil {
            return nil, hierr.Errorf(
                err,
                "unable to dial to ssh agent socket: %s",
                os.Getenv("SSH_AUTH_SOCK"),
            )
        }

        keyring = agent.NewClient(sock)
    } else {
        keyring = agent.NewKeyring()
    }

does the job but not sure this is the right think to do...

seletskiy commented 5 years ago

@tbellembois feel free to open pull request!

tbellembois commented 5 years ago

Done ! Thanks.