SSH to setup Static IP

Linux NOOB here.
I have installed the Pi Desktop on a VirtualBox and have pi-hole running and can connect to the web server. I want to change the to a static ip so need to re-run the setup.
I tried to putty into my VirtualBox instance but get a Network Error: connection refused. I think I need to enable SSL but how do I connect into my instance to do this? When I run my instance it appears headless in virtualbox - there is no GUI or command line.

You want to SSH into your virtual machine from the host system?

Try something like