I have been trying for weeks to figure out what's the issue, but I cannot seem to fix this.

I am developing a web app, and I have deployed to production using Heroku. I'm using Heroku Postgres for my database, and I'd like to psql into that hosted database from my local machine to make changes to it. I have tried from both Mac OS X and Linux Mint. 

However, no matter what I try, I keep getting the following error:

```
---> Connecting to HEROKU_POSTGRESQL_ORANGE_URL (DATABASE_URL)
psql: could not connect to server: Connection refused
    Is the server running on host "ec2-***-**-***-**.compute-1.amazonaws.com" (***.**.***.**) and accepting
    TCP/IP connections on port 5432?

```

I'm starting to think that I may have to SSH into the Amazon EC2 instance and change the Postgres configuration? Would that even be possible?