I am trying to set up a VPN with a Raspberry Pi, and the first step is gaining the ability to ssh
into the device from outside my local network. For whatever re
If you're on Mac, restarting the DNS responder fixed the issue for me.
sudo killall -HUP mDNSResponder
In my case I was trying ssh like this
ssh pedro@192.168.2.179:22
when the correct format is:
ssh pedro@192.168.2.179 -p 22
Try this, considering your allowed ports. Store your .pem
file in your Documents
folder for instance.
To gain access to it now all you have to do is cd [directory]
, which moves you to the directory of the allotted file. You can first type ls
, to list the directory contents you are currently in:
ls
cd /Documents
chmod 400 mycertificate.pem
ssh -i "mycertificate.pem" ec2-user@ec2-1-2-3-4.us-compass-0.compute.amazonaws.com -p 80