Using an SSH config file

The same trick can be used by specifying the ProxyJump option in your SSH config file:

Host *
IdentityFile ~/.ssh/id_ed25519
Port 22

Host CentOS2-V4
Hostname 192.168.33.11
User vagrant

Host CentOS3-V4
Hostname 192.168.33.12
User vagrant
ProxyJump CentOS2-V4

You can now SSH to centos3 via centos2:

[vagrant@centos1 ~]$ ssh CentOS3-V4
vagrant@192.168.33.11's password:
vagrant@192.168.33.12's password:
Last login: Thu Aug 9 14:15:03 2018 from 192.168.33.11
[vagrant@centos3 ~]$