Why do I not have access to defined aliases on the server while connected via ssh? How can I force the terminal to use their defined aliases?


It depends on where the aliases are defined for the user and the shell you are actually using locally or via SSH. For instance, if you are using BASH define your aliases (and any other preferences, export variables, etc) in:


Then, as long as you use bash shell locally and via SSH, you should have you aliases working.


You should check that you're using the shell that the alias file is for. If your aliases are in .bash_profile, but somehow you're in tcsh, your aliases won't work because they were never called, and even if they had been called, they might be in the wrong format for the shell you're in.

That answer presumes that you have an alias file on whatever machine is giving you trouble. If you have an alias file on one machine, and you're frustrated that when you ssh from that machine to another machine that doesn't have your alias file, you don't have your aliases: you have to copy them over and use the corresponding shell on the remote machine, too. ssh doesn't carry your aliases onto the remote machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.