TECHIES WORLD

For Techs.... Techniques.... Technologies....

BashCpanelLinux

How to configure SSH alias using bash alias

SSH alias will be helpful while dealing with multiple systems as there no need to remember all hostnames/ip addresses.

This article explains the steps to configure SSH alias using bash alias utility.

Step1: Open Open ~/.bashrc or ~/.bash_profile file.

Step2: Update the SSH connection and save.

alias webserver='ssh root@192.168.10.1'
alias dbbserver='ssh root@192.168.10.2'

Step3: Reload the aliases.

For ~/.bashrc,

#source ~/.bashrc

For ~/.bash_profile,

#source ~/.bash_profile

Now we can able to use the aliases for ssh in the following way.

#webserver

#dbserver

That's all…

Leave a Reply