1

I am trying to secure the PhpMyAdmin to revoke accessing publicly. I tried following step 4 of this link Secure PhpMyAdmin. But when I try to connect it showing a warning that unable to forward to the remote host.

I have Apache server running on that port. I tried accessing one public Linux server to another but that also didn't work. I'm trying to access mac PC. Though it shouldn't be a problem about the platform of remote PC.

I was able to forward a port that didn't have anything running. but failed to start apache2 on that port after connecting.

Elder Geek
  • 35,476
  • 25
  • 95
  • 181
  • 1
    Only `root` can use [well known ports](https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports), or those between 0 and 1023. I am assuming (and you should not be) `ssh`ing into the machine as `root`. Try a much higher port, such as 8080. `/etc/ssh/sshd_config` needs to allow for Port Forwarding, as well. – earthmeLon Jul 20 '19 at 09:43
  • @earthmeLon Post it as an answer :) – vidarlo Jul 21 '19 at 10:06
  • Related: https://superuser.com/questions/1194105/ssh-troubleshooting-remote-port-forwarding-failed-for-listen-port-errors – Elder Geek Jul 22 '19 at 13:07

1 Answers1

1

Only root can use well known ports, or those between 0 and 1023. I am assuming (and you should not be) sshing into the machine as root. Try a much higher port, such as 8080.

/etc/ssh/sshd_config needs to allow for Port Forwarding, as well.

earthmeLon
  • 11,042
  • 1
  • 36
  • 60