If ssh-copy-id hangs, you can use this:
cat ~/.ssh/*.pub | ssh root@172.17.0.1 '[[ ! -d .ssh ]] && mkdir .ssh && chmod 700 .ssh || cat >> .ssh/authorized_keys && echo "Key copied"
If ssh-copy-id hangs, you can use this:
cat ~/.ssh/*.pub | ssh root@172.17.0.1 '[[ ! -d .ssh ]] && mkdir .ssh && chmod 700 .ssh || cat >> .ssh/authorized_keys && echo "Key copied"