Create alias to connect to tunneled VM via SSH
If you need to create an alias in linux (Fedora 35+) to execute an SSH connection to a VM and then inside that VM run another SSH connection to another VM then read this:
- Create .bashrc.d folder in your home folder.
mkdir -p ~/.bashrc.d
- Create a file called aliases inside that folder.
cd ~/.bashrc.d
touch aliases
- Edit the newly created aliases file to add the SSH command that will do the magic.
alias skynet='ssh -t terminator@bridge1 ssh jconnor@skynet'
- Close the terminal and reopen it, you should now be able to run the alias to connect to Skynet.
Sources: