make sure you can reach the other host with ping command
ex 192.168.1.1 vmtest.mylearn.com vmtest
If you want to connect using tnsnames install database client and add tns entry to the tnsnames file.
ping <hostname> ex: ping vmtest
by default XE has
username/password hostname/ip (you can user either hostname or IP) listener port database SID