How to automatically define functions and aliases on remote server after ssh login
- by Ramon
I want to define bash functions and aliases in my remote shell automatically on login. I can't put the definitions into .profile or similar because the users I log in as are often shared with others who use the same systems and I don't have control of this. What I'm trying to do is execute a few bash function definitions in the remote process and then continue as a login shell. I tried this but it did not work:
cat ~/.profile - | ssh -tt user@host bash -l
Any ideas?