How are you connecting to the controller? If you're using RPC, note that SSH is a separate protocol that requires credentials, so you'd have to provide those explicitly. I'm not sure what else can lead to this condition.
Thanks for confirming you use RPC; that makes sense. Making an RPC connection to a controller is immaterial to using Invoke-NaSsh. RPC doesn't need explicit credentials, while SSH does. Both Connect-NaController and Invoke-NaSsh consult the credentials cache, which is why SSH is working for you now. You could have done any number of things, such as:
* Rely on $global:CurrentNaController using an HTTP/HTTPS connection