开发者

type ssh certificate password just once

I just coded a script using svnsync. Svnsync creates a connection to a remote host via ssh.

The authentification of the ssh-connection is realized via a certificate file. Alas everytime the script is executed it asks for the certificates password.

How can I set up my script, such as it can be run as cronjo开发者_运维知识库b. (does not ask for a pw) ?

I really don't want to type my password anywhere in plaintext. So encryption would be nice too.


You're probably looking for ssh-agent. You decrypt your keys into the agent, and then all ssh-clients that have access to the environment variables it defines get free access to the keys within. Excellent tool.


I think you have 2 options:

  1. Use an SSH key (certificate) without a passphrase and protect it with filesystem permissions.
  2. Use an SSH agent. The problem with this approach is that you need to enter a passphrase at some point so using it with cron jobs is a bit trickier.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜