


All devices connected to the access point should be able to use the resources on the home network, e.g. I am able to connect the tunnel but the proxy is the tricky part.Īs far as I understand you have a Raspberry Pi anywhere outside on the internet and want to connect in a secure way to your home network to use its resources. The endpoint of the tunnel is wlan1 and the other end of the tunnel is a computer on my home network. Yes, they are in fact called wlan0 and wlan1, 0 is for the access point and 1 is for uplink. I need an SSH tunnel to access resources inside my home network. Not all of my devices on the access point can do ssh/proxying, so I need it to happen between the tunnel and the access point. Does this make sense? I am fairly new at this kind of stuff, so any help is appreciated. My goal here is to setup an SSH Tunnel leaving the Raspberry Pi, and on the Raspberry Pi set a system wide SOCKS proxy as 127.0.0.1, to then proxy all requests entering the Pi's access point over towards my home Wi-Fi. I have successfully gotten an access point running on one Wi-Fi USB chip, and using another Wi-Fi USB chip I connected to the public Wi-Fi.
#Autossh reverse tunnel raspberry pi manual
I'd really like to make autossh work (I know I could find a workaround, like some crontab automatically relaunching my manual SSH tunnel but that'd probably be more brittle than making autossh work).I have a Raspberry Pi 3B+ that I'm using as a Wi-Fi hotspot. Note that I don't think it's a firewalling issue as the "non autossh" method works fine (but then I don't get the automatic "always up" / reconnect feature). What am I not understanding here or doing wrong? It's not asking for password, it's not showing any terminal/prompt. OpenSSH_6.7p1 Debian-5+deb8u1, OpenSSL 1.0.1k ĭebug1: Reading configuration data /etc/ssh/ssh_configĭebug1: /etc/ssh/ssh_config line 19: Applying options for *ĭebug1: Connecting to localhost port 20000.ĭebug1: key_load_public: No such file or directoryĭebug1: identity file /home/ksproxy/.ssh/id_rsa type -1ĭebug1: identity file /home/ksproxy/.ssh/id_rsa-cert type -1ĭebug1: Enabling compatibility mode for protocol 2.0ĭebug1: Local version string SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u1 Here's a the -vvv output ssh -vvv -t -p 20000 If I try the correct port (20000) but this time with the -t param, same thing: it "works" but I don't get no terminal/prompt. Ssh: connect to host localhost port 1234: Connection refused If I try another port, it fails: ssh -p 1234

I tried to "-vvv" the output of the ssh commands but it just shows that nothing is going on. This "works" but it's just stuck there, doing nothing. Now I try the same but this time with autossh: $ autossh -M 20000 -N -i /home/rspi/.ssh/id_rsa ssh -p 20000
#Autossh reverse tunnel raspberry pi password
I can even access the Raspberry Pi from my desktop (by first going through the server), doing: ssh -t "ssh -p first ask for the server's password, then for the Pi's password and everything is fine. So everything works fine: I enter the password and I get a terminal/prompt. On the Rpi: $ ssh -N -R 20000:localhost:22 the server (the one with the static IP): ssh -t -p $ (I've changed the real IP here in this question to 37. to not post the server's actual IP) Now I'm trying to make autossh (from Debian / Raspbian package autossh) to work too but I'm not succeeding. The user account I'm using on the server is called "ksproxy" (it's not really a "proxy" but whatever). I managed to create a reverse SSH tunnel between a Raspberry Pi 2 and a server of mine (server which has a static IP) and it works fine.
