Search code examples
apachesshwamplampsshd

Connecting to Apache Server


After I have created my apache server, and installed LAMP, I have portforwarded port 80, and am able to reach the server on any browser using my external IP. When I go to connect to the server through ssh using my terminal on my MacBook, I can only connect to it using the servers inet (IPv4) IP address, and not the external IP address using port 80, for example, I can connect to it using: ssh [email protected], but I cannot connect to it using: ssh -p 80 root@'external ip address' the error I get is: ssh_exchange_identification: Connection closed by remote host

PLEASE IF ANYONE CAN HELP! I have been struggling with this for days.

Thanks


Solution

  • SSH is port 22, you can't use it to connect to port 80. If you added the port 80 portion to your first command as well, you should see the same error.