Dino Geek, try to help you

How to configure an SSH tunnel with port forwarding?


To configure an SSH tunnel with port forwarding, follow these steps:

1. Open a terminal or command prompt on your local machine and log in to the remote server using SSH:

```
ssh username@remote_server_ip
```

1. Once logged in, enter the following command to create a new SSH tunnel:

```
ssh -L local_port:remote_server_ip:remote_port username@remote_server_ip
```

Replace `local_port` with the number of the local port you want to use for the SSH tunnel, `remote_server_ip` with the IP address of the remote server, and `remote_port` with the number of the remote port you want to forward traffic to.

1. After entering the command, you should see a message indicating that the SSH tunnel has been established:

```
The authenticity of host ‘remote_server_ip (x.x.x.x)’ can’t be established.
ECDSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added ‘remote_server_ip’ (ECDSA) to the list of known hosts.
username@remote_server_ip’s password:
Last login: Tue Jul 14 16:22:26 2020 from local_ip_address
```

1. With the SSH tunnel now established, any connections made to `localhost:local_port` on your local machine will be forwarded to `remote_server_ip:remote_port` on the remote server.

1. To test the SSH tunnel, open a web browser and enter `http://localhost:local_port` in the address bar. If everything is configured correctly, you should see the content of the page served by the remote server.

That’s it! You’ve successfully configured an SSH tunnel with port forwarding.


Simply generate articles to optimize your SEO
Simply generate articles to optimize your SEO





DinoGeek offers simple articles on complex technologies

Would you like to be quoted in this article? It's very simple, contact us at dino@eiki.fr

CSS | NodeJS | DNS | DMARC | MAPI | NNTP | htaccess | PHP | HTTPS | Drupal | WEB3 | LLM | Wordpress | TLD | Domain name | IMAP | TCP | NFT | MariaDB | FTP | Zigbee | NMAP | SNMP | SEO | E-Mail | LXC | HTTP | MangoDB | SFTP | RAG | SSH | HTML | ChatGPT API | OSPF | JavaScript | Docker | OpenVZ | ChatGPT | VPS | ZIMBRA | SPF | UDP | Joomla | IPV6 | BGP | Django | Reactjs | DKIM | VMWare | RSYNC | Python | TFTP | Webdav | FAAS | Apache | IPV4 | LDAP | POP3 | SMTP

| Whispers of love (API) | Déclaration d'Amour |






Legal Notice / General Conditions of Use