开发者

How to use ssh keys with Phing

开发者 https://www.devze.com 2023-04-13 05:48 出处:网络
When getting phing to use the SCP and SSH tasks, I currently have to enter my SSH password, but would like the tasks to use the key based authentication I have setup.

When getting phing to use the SCP and SSH tasks, I currently have to enter my SSH password, but would like the tasks to use the key based authentication I have setup.

As far as I can see, the SCP and SSH tasks in phing need to be supplied with the public key file, private key file, and the passphrase. Presumably I wouldn't want to hardcode my passphrase in my build file, so how do people use phing and ssh keys so that they don't have to enter the passphrase 开发者_运维知识库with every deploy?

And do I want to do this? Or would it be better to leave it needing a passphrase with each deploy?

(I run phing while ssh'ed into my dev server, and am able to ssh from there to the live server, using agent forwarding back to my Win PC running pageant.)


Use a ssh agent that stores the password for you for the current session.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号