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:

  1. Create .bashrc.d folder in your home folder.
mkdir -p ~/.bashrc.d
  1. Create a file called aliases inside that folder.
cd ~/.bashrc.d
touch aliases
  1. 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'
  1. Close the terminal and reopen it, you should now be able to run the alias to connect to Skynet.

Sources: