Agent forwarding
goik@local> ssh root@learn.mi.hdm-stuttgart.de Linux learn 6.5.13-1-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.13-1 (2024-02-05T13:50Z) x86_64 ... root@learn:~# ssh klausur.mi.hdm-stuttgart.de root@klausur.mi.hdm-stuttgart.de: Permission denied (publickey).
-
Copy private key
~/.ssh/id_ed25519
to intermediate host (and re-enter passphrase there). -
Enable agent forwarding.
Note
Agent authentication socket on originating client host required.
# File ~/.ssh/config goik@local ... Host learn.mi.hdm-stuttgart.de ForwardAgent yes # Forward ssh agent # to remote host. ... |
goik@local> ssh root@learn.mi.hdm-stuttgart.de Linux learn 6.5.13-1-pve #1 SMP ... ... root@learn:~# root@learn:~# ssh klausur.mi.hdm-stuttgart.de Linux klausur 6.8.8-4-pve #1 SMP ... ... root@klausur:~# |
No. 6
ssh host hopping
Q: |
In this exercise we pretend you can access a host A by ssh. On contrary a second host B can only be accessed from host A e.g. residing in a restricted network. You may thus:
|