PhpStorm
 
Get PhpStorm

Remote debugging via SSH tunnel

Last modified: 11 October 2024

This tutorial describes how to use an SSH tunnel (also known as SSH port forwarding) to set up a secure connection between a remote server running Xdebug and your development machine running PhpStorm. This can be useful for debugging code on a remote machine when there are firewalls in between, or a NAT router prevents direct connection, or the ISP or network infrastructure does not allow incoming TCP connections to the developer machine.

SSH tunnel diagram

When the remote server can connect to the developer machine directly (for example, with a Vagrant machine), an SSH tunnel may not be needed.