that's the simple scenario: from pc A i open a tunnel SSH to a pc B. Can someone, on pc B, use this tunnel to enter or forwarding some protocol to pc A? Can i limit traffic to be generated only from pc A? Thanks.
I'm assuming you're talking about an SSH port-forward "tunnel" -- If you run (for example)
The command above opens a listener on host A's local loopback address (127.0.0.1 / ::1) on port 8080.
Regarding the second part of your question (limiting traffic), by default SSH binds forwarded ports to localhost, so if you use the command above host A is the only one that can use the connection. The full syntax for the
For more information consult the OpenSSH man pages.