Commit e4231cbd authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

default identity

parent 51505025
# Adding support for scp files to the target (similar to install) ---
IDENTITY_FILE ?= "-i ~/.ssh/id_rsa"
IDENTITY_FILE ??= "~/.ssh/id_rsa"
do_target_scp () {
#Without next echo - no trace of the scp in the log!
tar -czvf ${WORKDIR}/image.tar.gz -C ${WORKDIR}/image .
echo scp ${IDENTITY_FILE} -p ${WORKDIR}/image.tar.gz ${REMOTE_USER}@${REMOTE_IP}:/
scp ${IDENTITY_FILE} -p ${WORKDIR}/image.tar.gz ${REMOTE_USER}@${REMOTE_IP}:/
echo ssh ${IDENTITY_FILE} ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND}
ssh ${IDENTITY_FILE} ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND}
echo scp -i ${IDENTITY_FILE} -p ${WORKDIR}/image.tar.gz ${REMOTE_USER}@${REMOTE_IP}:/
scp -i ${IDENTITY_FILE} -p ${WORKDIR}/image.tar.gz ${REMOTE_USER}@${REMOTE_IP}:/
echo ssh -i ${IDENTITY_FILE} ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND}
ssh -i ${IDENTITY_FILE} ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND}
}
addtask do_target_scp after do_install
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment