I would like to be able to ssh to my raspberry pi over the internet. So far I have done the following:
- Enabled the ssh server in
- Set a static internal IP for the raspberry pi
- Tried forwarding various router ports to port 22 on the raspberry pi
- Identified my external IP from a website
After this I either get
Name or service not found or
I have not yet messed with dynamic DNS, but my external IP seemed to be fixed at least during the hour I was working on this. From everything else I've seen these are the necessary steps. Is there something else I'm missing?
Edits: I am running the default Raspbian from NOOBS on Raspberry Pi 3. I am able to ssh to the pi from inside the network. I have not configured any firewall rules on the pi. This is my first attempt at port forwarding, so I have not done it successfully for any other machine.
I don't yet have a good way to get the results of
ssh -vvv. To be outside of my network at home I use my phone, but the app doesn't provide a
-vvv option. I tried just now from work, but I'm not sure the results are useful if the firewall is blocking the connection. From work here's what I got:
OpenSSH_6.7p1 Ubuntu-5ubuntu1.4, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to <IP> port 22.
debug1: connect to address <IP> port 22: Connection refused
ssh: connect to host <IP> port 22: Connection refused