sshssh-tunneltunneling

Reverse tunneling in RaspberryPI and cloud server?


I have a Raspberry Pi and and i have done reverse tunneling with an AWS instance. I ran the following command below on my Raspberry Pi.

ssh -N -R 1234:localhost:22 username@instance_IP

and on my Linux instance i am able to ssh using..

ssh -l user_pi -p 1234 localhost

but i am not able to ssh directly into my PI instead i first have to login to AWS and then into my PI..

how can i login to my PI directly using tunneling?

Thanks a lot!!


Solution

  • I found out that in case of direct remote connecting you need to allow Tcp Forwarding

    AllowTcpForwarding yes