How can I set an
alias on a remote machine over SSH with local ssh config (not editing the remote bashrc/profile files).
Background: I have a remote dev build machine that is shared with a few devs. We only use it for building software and publishing it, but occasionally, we need to make small changes in the code and git commit those. I don't want ssh keys on the remote machine, so we are using SSH agent forwarding so our local SSH keys are available on the remote machine for
git push. But we still need to set the git
user.email on the remote machine. Currently, just after logging in, I execute
alias git='git -c "user.name=My Name" -c "email@example.com"' so the git commits are attributed to me. Since we share the same account with a few devs, I don't want to set that alias in the remote
~/.bashrc file. So is there a way to set that command in my local
~/.ssh/config for the host so it gets executed in the shell when I login?