beaker icon indicating copy to clipboard operation
beaker copied to clipboard

Rsync may not be able to use a provided password for the SSH connection

Open trevor-vaughan opened this issue 4 years ago • 2 comments

The code for this is a little hairy but, based on testing voxpupuli/beaker-docker, I don't think that rsync is able to use the password provided for SSH connections.

The evidence of this is when I was attempting to run the main acceptance tests in beaker-docker which hook back into this repository. The connection would hang for rsync and prompt for the root password.

The code in question is in the do_rsync_to method in host.rb. I don't see any obvious method by which the connection is told to use the provided username/password authentication. The comments allude to Vagrant which makes me think that it was not tested in Docker.

trevor-vaughan avatar Feb 28 '21 20:02 trevor-vaughan

It does seem to allow setting some options for the ssh config I wonder if beaker-docker needs to set those somehow.

choffee avatar Nov 23 '21 11:11 choffee

I've worked around this by copying a ssh key over but it would be good if this could be done automatically and use a local generated key. host.scp_to("#{ENV['HOME']}/.ssh/id_rsa.pub", "/root/.ssh/authorized_keys") host.install_package('rsync')

choffee avatar Nov 23 '21 18:11 choffee