biwa7636
Posts: 24
Joined: Mon Aug 06, 2012 2:23 pm

Help with Global SSH

Mon Sep 03, 2012 4:56 am

Dear Guys,
Working on the SSH of raspberry pi.
Curious I want to access the raspberry pi at my home. While I type in the ip address, one of my friends told me that the ip address that I just typed in is 192.168.xx.xx which is the LAN which means that I can't access my raspberry pi when I left my home. Can my friend told me,. you access your raspberry pi using ssh, I need to figure out the static ip of raspberry pi while I am using a router connect my pi to the modem, and it is dynamic ip. It just sounds like a lot of work ....
Keywords: dynamic ip, static ip, ssh, raspberry

Can anyone told me how is everything really working or give me a link to some useful thread.
I am also working on it by myself and hope can be faster with you guy's kind help.
Thank you.

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Help with Global SSH

Mon Sep 03, 2012 5:54 am

Use a service like NO-IP and update your external IP through a script (or a Linux client , if
available).
Many routers can also do this (pre-installed feature)
Or you could make a script which mails you the external IP.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
kspn
Posts: 68
Joined: Mon Jan 16, 2012 9:52 pm
Location: Melbourne

Re: Help with Global SSH

Mon Sep 03, 2012 5:59 am

That was my solution. whenever my RasPi is plugged into a network it then emails me the current IP address (I am only use this because I don't have the RasPi plugged in all the time)

Personally I am using a small Python script to do that. PM me if you want a copy of the script :geek:
No Coffee, No Workee

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2869
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Help with Global SSH

Mon Sep 03, 2012 7:53 am

You will also need to set up port forwarding on your router, so that when you type in the router ip and the port number you have set up for the Pi, it will route you to the Pi's local ip. You'll need to go to your router's control panel to do this.
Alex Eames RasPi.TV, RasP.iO

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: Help with Global SSH

Mon Sep 03, 2012 12:35 pm

http://WhatIsMyIPAddress.com is one of many similar services - this is the first one that comes up in a Google search for "determine IP address". In fact, that Google search will result in display of the public IP address above the search results themselves.
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Help with Global SSH

Tue Sep 04, 2012 10:07 am

Once you've got it going, then you need to turn your attention to security, an open ssh port is an invitation for every scumbag and their scripts on the face of the planet to see if they can get in......

Look into port knocking, key only ssh and/or fire-walling that limits access to where you want to access it from.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

thexman
Posts: 259
Joined: Sat Apr 07, 2012 2:18 pm

Re: Help with Global SSH

Tue Sep 04, 2012 10:14 am

or just go commando and DMZ (de-millitrized zone ) on your router ,the IP of your PI

at the end of the day the Pi isnt connected to the Thermonuclear Press button Via its GPIO pins whats the worst that can happen.
one armed controls engineer, my grammar is bad but lets face it most keyboards don't suit a one armed man

khulat
Posts: 105
Joined: Sun Feb 12, 2012 9:43 pm

Re: Help with Global SSH

Tue Sep 04, 2012 10:26 am

thexman wrote:or just go commando and DMZ (de-millitrized zone ) on your router ,the IP of your PI

at the end of the day the Pi isnt connected to the Thermonuclear Press button Via its GPIO pins whats the worst that can happen.
I don't know if it is the worst that could happen, but it could be used as a Fileserver for very illegal things, that nobody in their right mind wants to have on their computers. So don't treat security as something that is not important with a Pi.

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Help with Global SSH

Tue Sep 04, 2012 1:48 pm

A spammer just wants resources - you are paying a electricity bill , network bandwith and provide "free" compute time.
You can look at prices for a VServer to see what I mean.
And you have a (small) reputation which can be misused .

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Return to “General discussion”