some more context would be helpful.
VM is running in Azure?
What error message do you get?
Authentication error?
Connection error?
Which user are you using to login?
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten