2

I have a Raspberry Pi 2 set up as a web server running apache. I have SSH setup so that I can connect to it on the LAN.

I'd like to connect to the Pi remotely so that I can either directly edit the index.html file or else download the index.html file, delete it from the server and then upload the edited version.

I can't find anywhere that explains how to do this when my router is already port forwarding to the Pi.

My question is, how can I do this?

Thanks.

1
  • 2
    Forward the SSH port (22 by default).
    – user186340
    May 13, 2015 at 15:16

1 Answer 1

2

1) Obtain your public IP address by requesting a static one or using a site like https://www.whatismyip.com/

2) Do a port forward from your modem/router to the internal IP of your raspberry pi on port 22

3) While not on your LAN, connect to your public IP address on port 22 and you should connect.

Each modem/router is going to handle that forwarding process differently so look in to the settings for your hardware. If you will want to view that html file (if it's being served like a normal page) you will also want to forward port 80 which some ISPs will actually prevent you from doing so you may need to use an alternate port for that.

What is your ISP? We can check if they are blocking specific ports.

3
  • I have my router port forwarding to the pi already on port 80. When I try to port forward to the pi's IP on port 22, the router says there is a confliction. I already host a website from the pi, I would like to ssh into the pi as well. May 13, 2015 at 15:43
  • Scrap that actually. That got it working. Thank you very much for your help! :) May 13, 2015 at 15:47
  • 1
    Ahh, glad to hear it! Have a great day :)
    – Abraxas
    May 13, 2015 at 15:48

Not the answer you're looking for? Browse other questions tagged .