I connect to server through ssh under vpn. To make project changes I always do the same procedure after accessing server - log as project_user, because with my identity I get
sh shell and I don't have write access to project files.
In my ~/.ssh/config file I tried to use
LocalCommand parameter to automate the procedure:
LocalCommand sudo -iu project_user bash
LocalCommand /bin/sh -c sudo -iu project_user bash
But none of this makes any change - after connecting I'm still in
sh shell and I need to run above commands again and again.
Update: sorry, but this LocalCommand parameter is meant for local and not remote command. Is there any ssh_config parameter that would let me execute remote command after connecting to server?
Or at least change the shell to bash so that I can execute my command through bash initialization scripts?