SSH forwarding or tunneling is a secure and encrypted pathway from a user’s local machine to a remote location over the SSH protocol.
With the ssh command:
local forwarding ssh -L local_port:destination_ip:remote_port ssh_server_hostname
remote forwarding ssh -R remote_port:localhost:local_port ssh_server_hostname