0

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>
GL2014
  • 6,016
  • 4
  • 15
  • 22

1 Answers1

0

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.

Community
  • 1
  • 1
Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
  • Added exec statement example. The bluealpha variable evaluates to a source directory, no auth info there. – GL2014 Jan 27 '14 at 22:07
  • @GreggLeventhal no "-e" option to the rsync command. Looks like it's communicating with a remote rsync daemon. In other words not using SSH. Check and see if the RSYNC_PASSWORD environment variable is being set (outside of ANT). – Mark O'Connor Jan 27 '14 at 22:10
  • Found it! There was an rsyncd.conf on the remote machine it allowed access to this box! Wow, that took a long time to find, thanks! – GL2014 Jan 28 '14 at 02:12