How to Access your Raspberry Pi via SSH over the Internet (port forwarding)

  Рет қаралды 91,493

Tony Teaches Tech

Tony Teaches Tech

3 жыл бұрын

Learn how to port forward so you can access your Raspberry Pi via SSH from anywhere in the world over the internet.
Find more at tonyteaches.tech
Check out my vlog channel ‪@TonyFlorida‬
#raspberrypi #ssh #portforwarding

Пікірлер: 104
@prashanthb6521
@prashanthb6521 Жыл бұрын
One friendly suggestion. Please draw network diagrams and corresponding animations to explain how the ports are forwarded or where the ports are open and where it needs to be forwarded.
@jonathanflores3748
@jonathanflores3748 Ай бұрын
Not all the tutorials go as smooth as this one, even though I had another internet supplier it still worked fine. Thank you for the help.
@alaaalotaibi6201
@alaaalotaibi6201 9 ай бұрын
man this is really helpful, easy and straightforward
@Figworm
@Figworm 2 жыл бұрын
I know in the video, the file hi.txt was new, so :wq is perfectly fine. Tip: Get in the habit of using :x instead of :q or :wq with vi variants. When just reading/viewing a file, using :x will exit without modifying the file's timestamp (useful with backup solutions that use in part, file timestamps for backups). Where as :q will modify the file's timestamp, regardless if the file was edited or not. Also, :x acts the same as :wq for modified files.
@williamhdixon
@williamhdixon Жыл бұрын
I've always used ZZ with the vi editor. If you've changed anything, it saves and exits, just like :wq. But if you haven't changed anything, it just exits, leaving the original file untouched. For me, as long as it isn't one of those "oh no I made a mistake" moments, it's the same keystrokes whether I changed the time, or it looked okay once I got in and looked at it.
@anthonymclaughlin9222
@anthonymclaughlin9222 2 жыл бұрын
Thanks, great video really clearly explains the solution in only 8 minutes!!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome Anthony
@garokejelian565
@garokejelian565 Жыл бұрын
Thanks you solved my problem with a simple explanation
@filipk729
@filipk729 2 жыл бұрын
Perfect, this it exactly what I was looking for. Answer to all my questions related to the remote ssh. Thank you kindly!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You are welcome!
@andymann6061
@andymann6061 Жыл бұрын
Me too!
@ArthursHD
@ArthursHD Жыл бұрын
Don't expose SSH and RDP like this to the internet without hardening!
@brunomattosrj
@brunomattosrj Жыл бұрын
Tony, you are incredible!
@zookoong8214
@zookoong8214 2 жыл бұрын
As a newbie, this video helps me perfect!!!!! Thanks I've subscribed and clicked thumbs up!!!!! Thanks!!!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Thank you so much for your support
@bennicolai1063
@bennicolai1063 2 жыл бұрын
I rarely like stuff, but this gets one from me. Very good video, helped a lot. Thanks
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome Ben
@vaibhavpatil9956
@vaibhavpatil9956 Жыл бұрын
Thanks Tony!!
@koka5491
@koka5491 Жыл бұрын
Thank you, i've been searching for a solution forever
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
You are welcome!
@RazahLP
@RazahLP 2 жыл бұрын
Thank you, very helpful!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome!
@STMONDEO1
@STMONDEO1 2 ай бұрын
Hi Tony Thanks for the video about port forwarding. As i have been struggling to get my raspberry pi to work over the internet with port forwarding. Thanks for your video. Peter
@TonyTeachesTech
@TonyTeachesTech 2 ай бұрын
You're welcome! Thanks for subscribing
@iflashlantern4292
@iflashlantern4292 Жыл бұрын
This video answered my questions perfectly. I just have one quick question. While researching port forwarding I've seen a lot of people online talking about risks to brute force attacks from outside. I just want to be able to SSH into and communicate over TCP with my raspberry pi while I'm in school. My pi is running Ubuntu Server 20.04.5. If I enable the firewall on my pi, do you think everything would be safe? Edit: nevermind, I found out I could just set the Ubuntu firewall (ufw) to only accept tcp connections (and ssh) over port 22 coming from specific IPs. i have it set to only accept form my router and my laptop's local (home network) ip address. once i get to school i'll add my computer's local ip from their network. i *think* this will be safe.
@johnb6767
@johnb6767 Жыл бұрын
Thanks Tony
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
You're welcome!
@kychemclass5850
@kychemclass5850 Ай бұрын
Maybe they blocked port 80 to encourage you to use HTTPS on 443. Did you check if they allow 443?
@oskarnygards8856
@oskarnygards8856 2 жыл бұрын
Thanks a lot! :-)
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome
@lukasthielen302
@lukasthielen302 3 жыл бұрын
great job. can you also set up two individual server/raspberry pi in your local network and access them both via port 22 or should each use a dedicated port?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Yes you can do that
@nicofish1000
@nicofish1000 2 жыл бұрын
thank you. I had my ssh server locally, but now that we can leave our houses again I need to be able to access it from elsewhere.....
@MPElectronique
@MPElectronique Жыл бұрын
Hey, thanks for the video. Is it possible to access multiple local webserver??
@Probler
@Probler 7 ай бұрын
This is a long time after u posted ur video but I really hope u see and answer my question. I don't really know and have my ip momorised at all times so I would like to connect to my ssh hosing my domain name, is that possible? And is there extra setup required or no?
@daurham
@daurham 2 жыл бұрын
Great video! Will running a server on this port allow me to connect to it? Or is SSH different in some fundamental way? I’ve only used it for remote connecting, so the concept isn’t landing for me
@shriram5494
@shriram5494 Жыл бұрын
you could run a server on port 22 and connect to it through the url ipv4address:22 on your web browser
@leozhang1340
@leozhang1340 4 ай бұрын
Is that port number 22 you entered the internal or external port? I have both available for me to edit.
@user-zo8ry4wr9y
@user-zo8ry4wr9y 3 ай бұрын
Can we connect VNC as well ?
@nhs.14
@nhs.14 Жыл бұрын
what happen if you dont have static ip for your router? most isp wont give static ip for cheap internet subscription
@ryandickinson4738
@ryandickinson4738 2 жыл бұрын
Do you need a static ip address to do any of this ?
@illumi1749
@illumi1749 Жыл бұрын
on my router it says to input a LAN and WAN port should i just do 22 for both
@joseponce9567
@joseponce9567 3 жыл бұрын
Nice video, I suposse if you have an active NGINX server running in the Raspberrypi, you will access directly to the web service developed?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Not sure I understand your question, but I do have a video about accessing an Nginx site on Pi here kzbin.info/www/bejne/d3fIqphnr7GjfNE
@DrsJacksonn
@DrsJacksonn 11 ай бұрын
Can you also use other ports than 22?
@satejratnaparkhi
@satejratnaparkhi Жыл бұрын
How to make router ip static without purchasing?? I tried some services like no-ip but when the router reboot or sometimes later the public IP get's changed and if I'm outside I don't know the public IP of my router then how I can ssh cause no ip also not changing the previous ip to new. Plz help......
@danieldenhartog2309
@danieldenhartog2309 2 жыл бұрын
Hi! Just a little heads up. I forwarded port 5900~5910:TCP on my modem (this port is for VNC) and was able to use my 'whatsmyIP' IP-adress as connection adress in VNC viewer. This was sufficient to be able to remotely control my RPi! For me, the SSH port did not work, so this might be a solution for anyone with the same problem! :) Cheers
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Nice workaround :)
@timt2708
@timt2708 Жыл бұрын
Weirdly, that worked, but ssh didnt. THANKS M8!
@airbus5717
@airbus5717 Жыл бұрын
if i have a pdf on the raspberry pi how do i view it on the phone?
@astroid9087
@astroid9087 2 жыл бұрын
If I want to ssh to 2 rpi How do I choose which one? 🤔 👍
@billloveless6869
@billloveless6869 2 жыл бұрын
Do you have to use the ports you listed? Thanks
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You can technically ssh with any port
@Lp-ze1tg
@Lp-ze1tg 3 жыл бұрын
Would that be a problem if the user plans to setup IPFire on the same network?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
I don't know, sorry
@taleivenvencatalapillay2039
@taleivenvencatalapillay2039 Жыл бұрын
can you tell me how to give someone access to your pi using your router
@taleivenvencatalapillay2039
@taleivenvencatalapillay2039 Жыл бұрын
can you pls tell me how to give someone access to your pi with your public ip
@chandandhiman8057
@chandandhiman8057 23 күн бұрын
This will only work with static ip not dynanic ip aadress
@sciencekhuong
@sciencekhuong 2 жыл бұрын
Can you port forwarding proftpd?
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
I don’t know sorry
@ignaciohdi
@ignaciohdi Жыл бұрын
Is there any kind of risk for doing this on a RaspberryPi 4, i don't think Raspberry has a firewall, and if it has it, it might not be as safe as the one in windows 10
@AR-15K1
@AR-15K1 Жыл бұрын
Use ufw
@timgiaychuyenadidasreal4800
@timgiaychuyenadidasreal4800 2 жыл бұрын
how to enter wifi password for raspberry through phone using app or webserver??
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Sorry I don't know
@thomasperri3294
@thomasperri3294 2 жыл бұрын
Is this safe to do? Is a VPN recommended?
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
A VPN won't help in this case. There is risk anytime you open a port to your local network.
@miloszfedorowicz5382
@miloszfedorowicz5382 2 жыл бұрын
Is this safe ? I mean every other tutorial to do this uses a VPN, I don't know why if it's that simple !
@devtest8259
@devtest8259 2 жыл бұрын
You can make a new port number and assign it to http requests. Nothing they can do to stop it.
@doomtomb3
@doomtomb3 23 күн бұрын
no mention of security. there's bot farms out there checking all IPs they can find for port 22. Then they gonna brute force your usernames like root, admin, etc. Linux does not recommend changing root username, so you are kind of stuck. You could at least use a random port for ssh instead of 22.
@TonyTeachesTech
@TonyTeachesTech 23 күн бұрын
Security by obfuscation is not a good technique
@delmoteperrin6584
@delmoteperrin6584 2 жыл бұрын
But what I can do if the raspberry is connected with a 4G modem?
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Can you port forward on your modem?
@delmoteperrin6584
@delmoteperrin6584 2 жыл бұрын
@@TonyTeachesTech I don't know how to do this. It's a USB modem 4 G
@gene_Code
@gene_Code Жыл бұрын
if you ISP gave u a NAT'ed IP address to your router then it is impossible to do port forwarding.
@tngdwn8350
@tngdwn8350 4 ай бұрын
Yeah, I faced this problem, at least I think so. Do you know if it's possible to circumvent it by using IPv6? Somehow I failed using IPv6.
@hasanmuhammod
@hasanmuhammod 2 жыл бұрын
Hey, will it work if I don't have a real ip? Cause I have a shared ip
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
As long as you have ssh access (with a username and password) to the server
@meeskees4227
@meeskees4227 5 ай бұрын
What to do if you have multiple raspberry pi’s?
@fun_blade9965
@fun_blade9965 2 ай бұрын
u just change the hostname of the each raspberry pi differely
@jonny777bike
@jonny777bike 2 жыл бұрын
How long that address though
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
What?
@jonny777bike
@jonny777bike 2 жыл бұрын
@@TonyTeachesTech I guess I didn't fully ask the question. How long does that address last. I really need to learn how to do Dynamic DNS. I still can't understand why we would need dynamic addresses with IPv6.
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
@@jonny777bike That will depend on the lease time defined by your internet service provider
@miningcraft1122
@miningcraft1122 Жыл бұрын
you should blur the IP address to avoid any DDoS
@tngdwn8350
@tngdwn8350 4 ай бұрын
Nah, the IP is changing. When he uploaded the video it wasn't "his" IP anymore.
@THE_PERSON4204
@THE_PERSON4204 Ай бұрын
bro just revealed his full ip adress💀💀
@iliketodostuff123
@iliketodostuff123 2 жыл бұрын
Umm my guy just showed us his public ip witch anyone can us to track him.
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
No worries, that was a temp IP that I'm no longer associated with :)
@yktserea2214
@yktserea2214 Жыл бұрын
Bluh
@yktserea2214
@yktserea2214 Жыл бұрын
Xh
@villocity5794
@villocity5794 2 жыл бұрын
hehe cox hehehe
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
😅
@cheapproductions6389
@cheapproductions6389 Жыл бұрын
hopefully he's using a VPN
@ArthursHD
@ArthursHD Жыл бұрын
don't expose SSH and RDP like this to the internet without hardening!
@IsaacEarl-eh9rz
@IsaacEarl-eh9rz 2 күн бұрын
He just gave us his IP adress...... hope nobody DDos' him
@tomcobb1829
@tomcobb1829 2 жыл бұрын
"St. Ignatius..." you a Jesuit?
@osm4834
@osm4834 Жыл бұрын
how do i do it with an arris att router
How to Install an Nginx Web Server on Raspberry Pi
7:44
Tony Teaches Tech
Рет қаралды 35 М.
UFC 302 : Махачев VS Порье
02:54
Setanta Sports UFC
Рет қаралды 1,4 МЛН
Заметили?
00:11
Double Bubble
Рет қаралды 3,6 МЛН
SSH Tunneling - Local & Remote Port Forwarding (by Example)
17:43
Hussein Nasser
Рет қаралды 237 М.
Control Your Raspberry Pi Remotely Using Your Phone | RaspController
8:22
Access Your Raspberry Pi Desktop from Anywhere with Internet
8:56
Circuit Basics
Рет қаралды 347 М.
The TOP 3 uses for a Raspberry Pi!!
12:07
NetworkChuck
Рет қаралды 1,4 МЛН
Raspberry Pi   Find IP Address and Connect with SSH from Windows 10
13:32
Top 10 Raspberry Pi Projects for 2022
7:54
Jeff Geerling
Рет қаралды 1,5 МЛН
SSH Tunneling Explained
6:37
Tinkernut
Рет қаралды 467 М.
Which one is the best? #katebrush #shorts
0:12
Kate Brush
Рет қаралды 19 МЛН
products you need to get taller 🍌,🍏, 🥕
0:35
Jamshid Jamshid
Рет қаралды 8 МЛН
🧲Порыбачили @Suslan11 @spiridonchik1
0:11
Палыч
Рет қаралды 3 МЛН
Try this 🤣  #funny #trending
0:14
Dung ABC
Рет қаралды 21 МЛН
ЛАЙФХАК ДЛЯ РОДИТЕЛЕЙ от Nika.Family
0:45
Привет, Я Ника!
Рет қаралды 3,8 МЛН