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.

Steve Robillard
35k18 gold badges106 silver badges110 bronze badges
asked Apr 15, 2015 at 16:46
7
  • First, check that you have really a public address on RPi itself with ifconfig. Commented Apr 15, 2015 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 Commented Apr 15, 2015 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. Commented Apr 15, 2015 at 20:13
  • What do you mean by "from another network"? Does the connection go through the internet? Commented Apr 15, 2015 at 20:26
  • @matthew yes, connection must be able to travel over internet. Commented Apr 15, 2015 at 20:27

3 Answers 3

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.

answered Apr 15, 2015 at 20:36
4
  • Optimum WiFi is public hot spot that's provided by CableVision (cable company) and users do not have access to setup port-forwarding. Commented Apr 15, 2015 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? Commented Apr 16, 2015 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... Commented Apr 16, 2015 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. Commented Apr 17, 2015 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

answered May 17, 2015 at 23:34
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.

answered Apr 24, 2015 at 20:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.