From: Bruno V. <bru...@pr...> - 2003-11-28 11:38:07
|
Bruno Vernay wrote: > Is there a simple way to use ssh-agent instead of empty passphrase ? > The problem is that ssh has to know 2 variables : - SSH_AUTH_SOCK=/tmp/ssh-XX4LkMJS/agent.26916 - SSH_AGENT_PID=26917 I tried to put them in the RsyncClientCmd : $Conf{RsyncClientCmd} = '. /home/backuppc/.info_agent;$sshPath -l root $host $rsyncPath $argList+'; .info_agent contain : SSH_AUTH_SOCK=/tmp/ssh-XX4LkMJS/agent.26916; export SSH_AUTH_SOCK; SSH_AGENT_PID=26917; export SSH_AGENT_PID; But it didn't work. I guess that the way BackupPC execute the RsyncClientCmd prohibit the use of 2 commands in the same line. Actually, I don't see how this could be done without a specific developpement. Since the variables will change each time the machine is reboot, they can't be simply put in config.pl. A file (.info_agent) needs to be sourced, so the variables are in the environment and the command with SSH can access them. Should we create a $Conf{SshAgentInfo} = '/home/backuppc/.info_agent' ? Then either Perl extract the info from the file and put them in ENV before launching the ssh commands or Perl source the file and launch the SSH in the same command. Should I fill a feature request and wait for 2.0.3 ?? I don't know a lot of Perl, but I am ready to test. Ressources : - http://www-106.ibm.com/developerworks/library/l-keyc2/ - http://www.akadia.com/services/ssh_agent.html - http://www.wlug.org.nz/SSHKeys Thanks Bruno |