0

I'm connected to Optimum WiFi with my Raspberry Pi 2 and I'd like to be able to SSH into it from another network and even though it seems like I got public ip address assigned to my wlan0 WiPi adapter I still cannot ssh in, I tried changing port from 22 to another that did NOT help.

sshd itself is running and listens on my newly selected port and I can ssh locally without any issues.

7
  • First, check that you have really a public address on RPi itself with ifconfig. – jaromrax Apr 15 '15 at 18:58
  • I dont know what Optimum WiFi is, but usually you need a permission on the router to pass through the port. And actually you can even be in subnet – jaromrax Apr 15 '15 at 19:00
  • @jaromrax I mean NO disrespect by saying following: if you would've read my question you wouldn't write comment #1 as my question already contain answer and comment #2 is not useful at all. – alexus Apr 15 '15 at 20:13
  • What do you mean by "from another network"? Does the connection go through the internet? – Matthew Apr 15 '15 at 20:26
  • @matthew yes, connection must be able to travel over internet. – alexus Apr 15 '15 at 20:27
1

To be able to connect to your pi from anywhere outside the local network, you will need to make sure that your router is set to port-forward.

To do so you will need to login to your router. If you're using Windows, open the command prompt and enter "ipconfig". Scroll up and find the ip address for the "Default Gateway", and enter this into your browser. If you're using Linux, the command is "ip addr".

It should then load a login page for your router, where you will need to enter the admin username and password. I cannot give you specific instructions after this part as each router has a different interface.

You will then need to search through the settings for an option that says "Port-Forwarding", which is usually a checkbox.

Restart your router and you should be able to connect from outside your local network.

4
  • Optimum WiFi is public hot spot that's provided by CableVision (cable company) and users do not have access to setup port-forwarding. – alexus Apr 15 '15 at 21:19
  • This page about the wifi doesn't mention anything about port-forwarding. optimum.net/internet/about-hotspots. Searching "port-forwarding optimum wifi" only mentions how to set up their router to port-forward. Are you sure? – Matthew Apr 16 '15 at 13:10
  • am I sure? am I sure of what? As I said before users do NOT have accesss to setup port-forwarding and you look at their page and also did not find anything... – alexus Apr 16 '15 at 21:25
  • My bad, I misread the comment. Anyway, "To be able to connect to your pi from anywhere outside the local network, you will need to make sure that your router is set to port-forward." If you can't port forward, you can't access from outside the network. – Matthew Apr 17 '15 at 14:42
1

Most likely, you got an IP address in the 25.0.0.0/8 subnet with Optimum Wifi, which is not routed on the internet. See http://www.dslreports.com/forum/r26531911-Optimum-Wifi-Ip-addresses

0

ssh reverse tunnel:

pi@raspberrypi ~ $ crontab -l | tail -1
@hourly     ssh -S alexus -O check X > /dev/null 2>&1 ; if [ $? != 0 ] ; then ssh -M -S alexus -fN -R2222:localhost:22 -p 443 X ; fi
pi@raspberrypi ~ $ 

req: sshd running on remote host, where you can ssh in and then ssh into your raspberry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.