My Bash aliases are not working over ssh, for example:
$ ssh remote_name ll dir_name
bash: ll: command not found
The Bash man page says:
Aliases are not expanded when the shell is not interactive,
unless the expand_aliases shell option is set using shopt...
So I added shopt -s expand_aliases
at the top of my ~/.bashrc
file in both the local and remote .bashrc
files (since I wasn't sure which was needed - remote right??).
I restarted the local Bash and tried ssh remote_name ll dir_name
again, unfortunately I still got the same error bash: ll: command not found
.
Can anyone explain what I should do to get this working please?
Just in case my Bash versions are:
Local Bash:
$ bash --version
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
Remote Bash:
$ bash --version
GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu)