How to tunnel firefox through ssh?
My situation is:
- I'm using a computer with firefox running
- I have an ssh server
I want to browse the internet as if I was browsing from the ssh server.
To do that, I use the ssh server as proxy in firefox.
In a terminal, I open an ssh tunnel and forward port 9090:
ssh -D9090 -N user@mysshserver
Then firefox has to be configured to use the ssh tunnel:
- open Preferences
- open Network Settings (scroll down in General tab)
- choose Manual proxy configuration
- in the SOCKS Host field, write
localhostand in the Port field, write9090 - keep the SOCKS v5 button selected
- click OK
Done.
To browse from the computer again, choose No proxy in Network Settings.
Downloading videos with yt-dlp through ssh proxy
Start ssh in same way as before and run in another terminal:
# ssh -D9090 -N user@mysshserver
yt-dlp --proxy socks5://127.0.0.1:9090/ urlToVideo
hashtags: #firefox #ssh #yt-dlp