문제

There is an Ant script which is rsync-ing data to a remote server via an exec statement, however I don't see any method for authentication to the remote server. The script runs as root (OS is Mac OS X), but when I try to SSH to the remote server as Root I get prompted for a password. How do I track down where/how the authentication is happening?

 <exec dir="/usr/bin/" executable="rsync">
     <arg value="-av" /> 
    <arg value="${bluealphaout}" />
    <arg value="Remote_Server::Some_Folder/by_name/" />
    </exec>
도움이 되었습니까?

해결책

You'll need to show the command-line used to run rsync. I'm guessing it's one of two problems:

  1. Your rsync command is not running over ssh (See the "-e" option in the manual)
  2. Your ssh connection is using an alternative ssh key

For an example of running rsync over ssh (using ANT) see:

Finally, if all else fails (and provided rsync is using ssh), you could check the sshd log file on the remote server to see how the connection is being authenticated using ANT.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top