1

The "server" ("mini", running OSX 10.6) has SysPrefs>Sharing>RemoteLogin enabled. I can log in from another machine on the LAN with ssh [email protected] just fine. To enable access from WAN, I assigned a static IP address to mini (192.168.1.102) and added a portmapping entry in my TimeCapsule, mapping port 10221 to 192.168.1.102:21. I have a DynDNS hostname, so I should be able to log in via ssh -p 10221 [email protected] but it just hangs and eventually times out.

I verified that DNS is mapping my.homeip.net to my correct public IP address.

Is there another setting on 'mini' that I've overlooked, that allows local connections but disregards non-local ones?

2 Answers 2

1

You are forwarding to port 21 on your mac mini. SSH uses port 22.

You are also not forced to use a different port on the router: you could map port 22 to 192.168.1.102:22

2
  • Thanks -- that was my mistake (my confusion came from the fact that I'm actually trying to do SFTP). And yes, I know I can map public 22 instead, but I have several hosts on the LAN that I'll eventually want to connect to, so I'm just adopting a consistent port numbering system.
    – Chap
    Sep 15, 2011 at 15:01
  • @Chap: make sense
    – Matteo
    Sep 15, 2011 at 15:02
0

Port 21 is reserved for FTP. Why not set the public and private port to 22? Try "the usual way" first to see if it works, then try wacky port numbers if you're truly keen on securing-by-obscuring.

2
  • He is forwarding to port 21. So this is typo/mistake not a wrong choice of port.
    – Matteo
    Sep 15, 2011 at 14:52
  • @Matteo: correct - just a confusion over SSH and SFTP. No unusualness intended.
    – Chap
    Sep 15, 2011 at 15:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .