I am able to SSH locally into MAC OS X on standard port 22. But when I try to SSH via public ip I get connection refused. I have forwarded port 22 on the router to MAC OS IP. When I run nmap local-ip port 22 says it open, but when I run nmap on public-ip port 22 says closed. So I think port 22 is closed on public IP, and I'm unsure how to open it. I'm still pretty new to ssh any help would be appreciated.
Asked
Active
Viewed 6,871 times
2 Answers
1
Well the answer turned out to be rather simple for me. I live in an apartment complex, and at this time I share a public IP with all who live in the complex. I have to request my own public IP to get this working. However I hope others will benefit from the other comments and answers given!
EDIT: I suppose a solution for this is posted here
0
Verify if your ISP is blocking the port 22 (it's easy to search).
Also, be sure that your port forwarding is correct:
- IP source must be empty
- Source port is 22
- IP Destination must point to your computer local ip (which is given by your router and looks like 192.168.X.X [warning: 192.168.X.1 is your router])
- Destination port is 22
If your ISP does block port 22, a little trick that could work is setting the source port to 443 (SSL) [keep the destination one to 22], which is more often open that SSH. Be sure if you try to connect to your server from outside that you specified the port 443.
max890
- 251