Remote command does session exits


When I try the option to issue remote command, the session exists after the command is issued. It is always happening to me in every session defined.

> 11:12:38 Connected

total 941

-rw-------. 1 weiasf01 platforms_plan 1615 Oct 15 10:06 weiasf01@

-rw-r-----. 1 weiasf01 platforms_tech 959025 Dec 12 16:14 traffic-flows

Connection to closed.

> 11:12:39 The Core Helper connection has terminated.

> 11:12:39 Disconnected

In ssh man page:

If a command is specified, it is executed on the remote host instead of a login shell.

If you want to keep the interactive shell after remote command executed, you should specify RemoteCommand to something like this:


Replace ls; pwd to whatever command you'd like.