$ ssh -l postgres 200.34.22.75
postgres@200.34.22.75's password:
Linux localhost 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64
// Login as PostgreSQL superuser “postgres” on remote PostgreSQL server using ssh (Linux)
root@localhost:~# su - postgres
// Login as PostgreSQL superuser “postgres” (Linux)
postgres@localhost:~$ psql
psql (9.6.12)Type "help" for help.postgres=#
// Enter PostgreSQL Command Line via “psql” client (psql)
\c test
You are now connected to database "test" as user "postgres".
// Connect to a PostgreSQL database “test” as “postgres” user (psql)
$ psql -V
psql (PostgreSQL) 9.6.12
// Check psql client version (psql)
select version();
version
-----------------------------------------------------------------------------------------------------------
PostgreSQL 9.6.12 on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit
(1 row)
// Check postgres server version (SQL)