Connection refused i Console

Did you ssh into your openhab server first? This command tried to connect to local host if you type on the Mac you most likely will get a refusal.

You need ssh username@openhabserver first then the comman you stated.