I have the following bash script in Linux Ubuntu which opens a new terminal with multiple tabs and in each tab it executes ssh
command to access a remote router:
#!/bin/bash
gnome-terminal --tab -e "ssh [email protected]" --tab -e "ssh [email protected]"
In the bashrc file, I have included the definition of the following alias commands:
alias router4='ssh [email protected]'
alias router5='ssh [email protected]'
When I replace the full ssh
command in the first script with these alias commands, each Tab gives me the following error:
There was an error creating the child process for this terminal
Failed to execute child process "router6" (No such file or directory)
How to solve this problem?
Note: When I execute the previous alias commands in a maually opened tab, they work perfectly.