Set up port forwarding rule in VM Settings > Network > Adapter 1 > Advanced > Port Forwarding:

ProtocolTCP
Host IP127.0.0.1
Host Port22
Guest IP10.0.2.15or get IP with ifconfig
Guest Port22

Then log in with

ssh localhost