Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

The "server" ("mini", running OSX 10.6) has SysPrefs>Sharing>RemoteLogin enabled. I can log in from another machine on the LAN with ssh me@mini.local 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 me@my.homeip.net 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?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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

share|improve this answer
    
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 '11 at 15:01
    
@Chap: make sense –  Matteo Sep 15 '11 at 15:02

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.

share|improve this answer
    
He is forwarding to port 21. So this is typo/mistake not a wrong choice of port. –  Matteo Sep 15 '11 at 14:52
    
@Matteo: correct - just a confusion over SSH and SFTP. No unusualness intended. –  Chap Sep 15 '11 at 15:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.