Use specific key to connect to jump host without modifying ssh config file
Solution 1:
No, you'll have to either
-
use two
-i
parameters and allow ssh to offer both keys to both servers (the order of-i
versus-J
doesn't matter); -
or replace
-J
with a manual ProxyCommand:ssh target -oProxyCommand="ssh proxyhost -i ~/otherkey -W %h:%p" -i ~/thiskey