nietsnegttiw nietsnegttiw - 5 months ago 6x
Linux Question

How To Find Credentials of Host Machine in VM?

I thought I was sshing into an old server, but it turns out to be a VM into which I ssh'd. I don't know the credentials of the host machine and would like to get this to connect to it directly. Is there a way I can find this through the VM?

Suppose I just want whatever I can get - in this case, perhaps just the IP, as robmathers notes.

dmidecode | egrep -i 'system-product-name'

gives me "VMware Virtual Platform".


No. Passwords in Linux are stored in encrypted form and you can't read them. But if you can change the password by mounting the virtual hard drive and modifying /etc/shadow (unless the drive is encrypted). There are many guides how to do that.