Setup ssh keys between machines so you can connect without password
Put machine A’s ~/.ssh/id-rsa.pub’s content in machine B’s ~/.ssh/authorized_keys You can do so with: ssh-copy-id -i ~/.ssh/id_rsa.pub user@<machine b’s hostname> by the way, the id-rsa.pub can be created with ssh-keygen.