I need to connect to the postgresql database on a remote host. The host need authentication as well as the database. So the host=192.168.0.116 port=8022 hostusername = hostName password for host= hostPass Postgres database name = databaseName database login username = userName database login password = userPass I can do the ssh to connect to the host Net::SSH.start('192.168.0.116', hostName,:port=>8022, :password=>hostPass) But I don't know how to continue and get connect with the database on the host. The closest way I can think of is: conn = PGconn.connect('192.168.0.116',8022,'','','databaseName','userName','userPass') The error I was getting is: `initialize': SSL error: wrong version number (PGError) expected authentication request from server, but received S Does anyone have the same problem. I would appreciate any inputs. Thanks a lot!! -- Posted via http://www.ruby-forum.com/.