SSH to Red Hat CRC VM
Red Hat CRC is installed by running a pre-configured VM. In case the OpenShift 4 installation is not working as expected, like no images can be loaded from the internet, a deeper validation might be needed. For instance, to see if the VM can connect to the internet, you’d need to log on and run a ping or curl command. The Web UI is not giving this kind of possibility. Luckily, the CRC creators included an option to connect to inside the VM as a user via SSH.
The SSH key can be found in the .crc directory of the user that configured CRC. In my case, the user Id is tobias, therefore the location of the SSH files is:
/home/tobias/.crc/machines/crc/
Login using a password is not allowed. A SSH key is needed. The user id of the user inside the VM is named core. The complete cli command to log on is:
ssh -i /home/tobias/.crc/machines/crc/id_ecdsa core@"192.168.130.11"
3 Comments
Javier · September 28, 2021 at 01:26
Thanks alot my friend…
Salam · November 25, 2023 at 11:17
Thanks Tobia, I did try yoyr ssh command but I get
ssh: connect to host api.crc.testing port 22: Connection refused
How can I allow ssh access? Thanks
Mario · November 26, 2023 at 13:35
Thank’s for that information.