Home / All / Accessing A Raspberry Pi Behind A Router Using SSH.
Raspberry Pi Behind A Router
Spunky Technology

Accessing A Raspberry Pi Behind A Router Using SSH.

Wondering how to access and control your Pi from Internet . You are at the right place.

How to access a Raspberry Pi Behind a Router Using SSH .

What Do You Need ??                                                                                                                                                              

You would need just a few things .

1.) Raspberry Pi ( Any Model ) Connected to Your Router .

2.) SSH Client – Putty (Windows).

3.) Working Internet Connection .

4.) Static IP by ISP (Recommended ) . You could use DNS Services as well.


Getting Started 

Enabling Secure Socket Shell (SSH )

1.) Connect your Pi to a router and to a display.

2.) Goto Terminal And Type in sudo raspi-config . 

sudo raspi-config
sudo raspi-config



3.) Navigate to Advanced Options > SSH . 

Now goto Advanced Options > SSH .
Now goto Advanced Options > SSH .






Select SSH

4.) Select SSH and then Enable .

5.) Now Goto Terminal And Type ifconfig .


6.) Search for inet address and Remember or Copy it .








Now once we have configured SSH . The next step is port forwarding.

Port Forwarding. 

1.) Come to your Web Browser Type in your default gateway address. For example- . 

I would be using Dlink Router . 2750U
I would be using Dlink Router . 2750U

2.) Login with your details .

3.) Search for Port Forward Section in your router.



4.) Click On Add / New .

5.) For-

 Server Name – ( ANY NAME OF YOUR CHOICE ) . 

 Host Name / Server IP – (The IP we got from Pi.).

 Remote IP (IF Required) – 

 Start Port: 22 

 End Port : 22 

 Protocol – TCP 

External IP 


2.) Copy Your external IP .

3.) Goto Putty.

4.) Type in the external IP with Port as 22 .(Default ) .

5.) Enter Your Password. By default its.

Login – pi

Password – raspberry

There Yaaaou Go . Dont forget to share.

About Abdul Hannan Mustajab

Well hello there! Not wanting to keep myself obscure,here's something about me. WHO AM I? Im a young 17 year old,based in India. Currently pursuing education in the science - math stream , im an Computer Science aspirator. WHAT DO I LIKE? A simple statement says it all, computers & tech. WHAT DO I KNOW? I have a passion for programming and have learned the following programming languages so far - C,python,PHP & angular js. Also do I possess knowledge regarding web servers and linux and shell related stuff. WHAT ARE MY INTERESTS? Im interested in Raspberry pi & Arduino associated home automation and well that's what my website is about!

Check Also

Setup Instagram AutoLiker Bot On Raspberry Pi

  Do you have a instagram account and you wish to have thousands of followers …

Leave a Reply