How to configure ssh to imitate this:ssh server1-user-name@server1.net -i /path/to/.ssh/server-1-ssh-key -t ssh server2-user-name@10.0.0.10 -i /home/server1-user-name/.ssh/server2-ssh-keyWhen I executessh server2Explanation:I'm login to server1.net with a key from my local machine (/path/to/.ssh/server-1-ssh-key)ssh server1-user-name@server1.net -i /path/to/.ssh/server-1-ssh-keythen I log in to a server with the following IP 10.0.0.10. To do this I use the key (/home/server1-user-name/.ssh/server2-ssh-key), which is stored on server-1How should the ssh configuration look like for this case on my local machine?I tried the following configuration:Host server2  Hostname 10.0.0.10  User server2-user-name  ForwardAgent yes  ProxyCommand ssh -i /path/to/.ssh/server-1-ssh-key -W %h:%pBut it does not work.
How to ssh to a server using another server with key from the second server?
ssh;proxy
So basically you want server1 to act as your jumpbox, so you need one stanza for server1:Host server1Hostname server1.netUser server1-user-nameIdentityFile /path/to/.ssh/server-1-ssh-keyThen you need a stanza for server 2 that jumps through this one:Host server2Hostname 10.0.0.10User server2-user-nameForwardAgent yesProxyCommand ssh server1 nc %h %p 2> /dev/nullIdentityFile /home/server1-user-name/.ssh/server2-ssh-key