0. open a terminal in VM1 and VM2, type ifconfig to find the ip address of your VM1 and VM2. (it's not this one: 127.0.0.1). 1. on VM1, type ssh-keygen -t rsa, keep typing Enter 3 times at the prompt. for example: [01/14/19]seed@VM:~$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/seed/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/seed/.ssh/id_rsa. Your public key has been saved in /home/seed/.ssh/id_rsa.pub. The key fingerprint is: SHA256:vIryVpWhGnQK/BIcpzYz803D+XwfwepPQ3osXlYg+1Y seed@VM The key's randomart image is: +---[RSA 2048]----+ | o... | | =o..... . | | B= o=. o. + | | ..*+o.=o + o | | ..o..S + o E | | . . + * + | | . . + @ | | . .. . . O . | | +o . . . | +----[SHA256]-----+ 2. on VM1, type "scp /home/seed/.ssh/id_rsa.pub 172.16.228.129:/home/seed/.ssh/authorized_keys" Note: replace 172.16.228.129 with your VM2's ip address. for example: [01/14/19]seed@VM:~$ scp /home/seed/.ssh/id_rsa.pub 172.16.228.129:/home/seed/.ssh/authorized_keys seed@172.16.228.129's password: id_rsa.pub 100% 389 0.4KB/s 00:00 3. Now you should be able to ssh from VM1 to VM2 without providing the password. for example: [01/14/19]seed@VM:~$ ssh 172.16.228.129 Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.8.0-36-generic i686) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage 3 packages can be updated. 0 updates are security updates. Last login: Wed Nov 28 11:15:23 2018 from 172.16.228.1 4. repeat step 1 on VM2. 5. on VM2, type "scp /home/seed/.ssh/id_rsa.pub 172.16.228.128:/home/seed/.ssh/authorized_keys" Note: replace 172.16.228.128 with your VM1's ip address. 6. Now you should be able to ssh from VM2 to VM1 without providing the password.