I want to run a few shell commands every time I SSH to a server via PuTTY. I\'m connecting to a production web server managed by someone else, and I don\'t want to store my
The SSH session closes (and PuTTY with it) as soon as the command finishes. By default the "command" is a shell. As you have overridden this default "command" and yet you want to run the shell nevertheless, you have to explicitly execute the shell yourself:
my-command ; /bin/bash
See also Executing a specific command on the server.