I have a server named as servername.mydomain.com. I can do ssh to this server using a port number X using:
ssh myusername@servername.mydomain.com -p X
From this server I can run:
psql -h localhost -d myDatabase -U myusername -p DBPORT
Instead of having to login using ssh I want to be able to use psql as:
psql -h servername.mydomain.com:X -d myDatabase -U myusername -p DBPORT
Is this possible? I tried this but I am getting the message: could not translate hostname ...