So I want to replace/augment them with my own SSH tunnels (better having multiple redundancy options for extremely remote - other side of the planet - IoT devices...).
I was hoping to do this with my pre-existing AWS EC2 instance (running Amazon Linux, equivalent to Red Hat).
Whenever I SSH into the EC2 instance, I have to use a .pem file.
I tried rayjoh's suggestion in an earlier discussion viewtopic.php?p=993843#p993843, with minor modification to include the .pem file. So I actually did the following:
Code: Select all
On pi
ssh -i pemfile.pem -R 7575:localhost:7575 ec2-user@1.1.1.1
On my Mac
ssh -L 7575:localhost:7575 ec2-user@1.1.1.1
However, when I ran the first command (on the Pi), all it did was open a new SSH connection from the Pi to the EC2 instance (i.e. I could control the EC2 instance through the SSH connection I had made to control the Pi).
And when I ran the second command on the Mac, it simply connected to the EC2 instance.
My goal is to be able to remotely control the RPi from my Mac.
Could someone please explain what I'm doing wrong?
Thanks in advance.