I want to ssh into a remote Ubuntu computer, source my .bashrc and run a command that depends on parameters set by that .bashrc. All that in an interactive shell that doesn't close after the command is done.
What I tried until now is
ssh user@remote_computer -t 'bash -l -c "my_alias;bash"'
or just
ssh user@remote_computer -t "my_alias;bash"
This works for general commands (like ls for example) but when I try to run an alias defined in .bashrc I get an error:
bash: my_alias: command not found
But then when I write it manually again and run it, it works!
So how can I make sure the the .bashrc is sourced before the command is called?