Get SSH to simulate an interactive session, non-interactively
I'm trying to connect to a shell server via ssh non-interactively, however it seems to treat sessions quite differently based on whether or not it is an interactive or non-interactive session. Basically, I want to be able to send this command:
AS IF I had, as separate commands, ran:
ssh email@example.com "cd directory; ./script.sh"
me@computer:~$ ssh firstname.lastname@example.org
[me@shell ~]$ cd directory
[me@shell ~/directory]$ ./script.sh
How do I do this so the shell server thinks I am running an interactive session even if I'm not?
The whole thing is so patently infantile, so foreign to reality, that to anyone with a friendly attitude to humanity it is painful to think that the great majority of mortals will never be able to rise above this view of life.