I need to migrate my web sites to another host, the domain name remains the same, but I need to access my files on the old server after I changed the nameservers, is that posiibile? I have shared ip adress on both hosts.
While you haven't cancel your hosting contract, you should have the needed access.
Client webs are accessible with internal URLs, for cases, where hosting clients don't (yet) have domains (possible causes could be: not yet registered, is transferred from other hoster).
Such URLs could be subdomains at your hosting, looking like https://your-internal-client-id.your-hosting.com
Ask your hosting, what internal URL points to your /public_html.
This was really simple up to the point where you said "I have shared ip adress on both hosts." Do you mean the same IP address for both hosts? This is unlikely. But you may be using a reverse proxy provided by the hosting.
OTOH you then say you need to "change the nameservers".
If the 2 hosts have different IP addresses then all you should need to do is override the DNS settings (on your local DNS server or on the hosts file) to connect to the old server using the name. While this is required for HTTPS and HTTP (at least it is required if you are using an off-the-shelf browser) you can still connect to the old server via its IP address using other protocols.