Consider these 2 scenarios.
(1) Let's say I login into an SSH server named A normally using
ssh [username] @ [IP address of A].
And now I connected to another server named B which is accepting telnet connections using
telnet [IP address of B]
from that SSH session.
(2) And I set up a tunnel using SSH from my machine to B using ssh -L 9000:[IP address of B]:23 [username]@[IP address of A].
And I opened another terminal and executed telnet localhost 9000.
Is there any difference between these two? In particular, can someone explain what happens under the hood in these 2 scenarios? (I mean how the packets travel from source to destination and whether they are encrypted or not)