Accessing a remote system with a hostname is a bit tricky in windows 10. I went on forgetting after it is done, so writing it as a reference.
It is very easy to map remote ip with a hostname.
The file is located under
C:WindowsSystem32driversetchosts
You need to be an administrator or open notepad to change the file.
In this file, you just need to type ip address of the remote system and the hostname to access it.
Thats it !