You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Note!! Please register for a free account to access the full content and also to participate in Q&A in the community

How to Configure SSH Port Forwarding on Linux

edited Oct 21, 2022 7:08AM in Linux

Local port forwarding over SSH (also known as SSH Tunneling) maps a local port on the client system to a remote port on the server system. This configuration enables you to access services on the remote system that are otherwise inaccessible because the services might be running behind a firewall or might not be listening on a public network interface.

You can use an ssh connection from a client to the server you want to forward a port from by using the -L option with the following syntax:

# ssh -L [bind_address:]port:host:hostport user@ssh_server

For instance, to forward the Cockpit service running on an Oracle Linux 8 server using port 9090, run this command on your SSH client:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!