You could well have valid connection parameters, but make sure that the ports you are using are open. For netTcp port 2660 must be open on your firewall, note also that netTcp is a non-routable protocol.
So one example to connect over https would be
Set-TridionCoreServiceSettings -ConnectionType Basic-SSL -HostName $SDLCloudCMS -Version Sites-9.0 -Credential $credential -CredentialType Basic
$client = Get-TridionCoreServiceClient $CMSVersion = $client.GetApiVersion()
Set-TridionCoreServiceSettings -ConnectionType Basic-SSL -HostName $SDLCloudCMS -Version Sites-9.0 -Credential $credential -CredentialType Basic
$client = Get-TridionCoreServiceClient
$CMSVersion = $client.GetApiVersion()
But it depends on what is configured in your CMS server.