I am in a situation where several users are sharing the same user account on a remote machine. I have a "personal" directory where I wrote my own .zshrc file, and I would like to have a way to:
- Start a ssh session in the remote machine with directives from my ssh config file
(e.g.
ControlMaster auto) - This session runs a Z shell
- It runs a
.zshrcin my "personal" directory (not on the shared user's home directory)
It would be nice to have an alias or a simple way of starting such ssh sessions (that's why I thought about using the OpenSSH's config file), but I am open to any other ideas!
Using OpenSSH's config file?
I read on the OpenSSH's ssh_config man page that I can use the directive LocalCommand to specify a command to run locally after successfully connecting to the server. This made me think there may be a way to tell the config file what command to run remotely after connecting to the server, but there doesn't seem to be any.