At first I execute "ssh address@hidden screen -d -m" to open and detach a console on a remote server. Then I want to execute a command into this console and I execute "ssh address@hidden screen -X ls". I get this answer: "Connection to server closed."
However I can log into this server (I set up pki ssh auth) to login with keys.
I also use the -S flag to specity the session but it was unuseful.