1

I'd like to send one file to remote host which is defined as alias in drush.

The file is actually private ssh key, so it needs to be placed in ~/.ssh.

I've tried the following command:

drush -v rsync conf/my_rsa @remote:~/.ssh/

but then it's saying:

You will destroy data from drush@remote:'/var/www/~/.ssh/'

I don't want to destroy any existing data in my ~/.ssh.

Any workaround to that?

2

I've found the following workaround useful:

cat my_rsa | drush @remote ssh "cat > ~/.ssh/my_rsa"

It'll send content of the file directly via ssh into the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.