I use an iMac at home and a MacBook at work. My Macbook is pretty slow so I want to ssh to my iMac at home to code (I use vim and tmux). I think it might help save some battery for my Macbook too.

I use wifi service from the house owner and I can not access to the router, so I can not configure port forwarding for port 22 (which is used by ssh protocol).

Is there anyway to get around this problem? I heard we can use ssh tunnel to change the port I need to access, but when I read this article:


It seems like I still have forward port 22 on router to create a ssh tunnel. I don't want to pay for VPN service, and I don't need screen sharing (team viewer, VNC, chrome remote desktop...)

  • You need some computer that you have access to with a public IP somewhere, otherwise it won't work. – dirkt Mar 17 at 12:20
  • Please don't open port 22 on routers. There will usually be 5 to 20 malicious attempts to access it per minute of you do. sshd can be configured to use another port, and ssh can have the port set at the command line. – Guy Gastineau Mar 17 at 20:45

one solution could be to use TOR to route the connection.

This way you don't need to change the router configuration (unless there are no rules that prevent tor from working properly).

A good example can be found here!

  • Thanks, I'll give it a try – San Nguyen Mar 17 at 14:55
  • Has the solution with TOR worked? – Danfossi Mar 23 at 11:24
  • no, I gave up. Actually I would like to turn my mac at home to be something like code-server but turned out it's too complex. – San Nguyen Apr 4 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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