by malandrew · 12y ago · 0 comments
Basically, once I SSH and I'm root during the provisioning process, how do I programmatically set up ssh-agent for an in progress ssh session so that all future commands have access to the SSH_AUTH_SOCKET on my localhost.
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom...
Container commands run 'before' your app is deployed, so you can pull in deps/etc.
Not sure if that is any easier on eb though. Some other ideas: http://stackoverflow.com/questions/13476138/setting-up-priva...
Basically, I need to expose my ssh-agent socket to the world via a TCP socket exposed to the world. The server would then install spiped, get the symmetric key that allows it to connect to my ssh-agent-port and set up the SSH_AUTH_SOCK to proxy requests to my machine.
This is still more secure than ever letting your private key ever leave your machine.
While I don't think I need it anymore since I can mount the unix domain socket anywhere, I did find this script useful and think others here may as well:
Try changing the sshd config and send the sshd a reload signal.
Normally that keeps existing connections alive. YMMV.