0

UbuntuサーバーにPostgreSQLをインストールしていて、リモートMacBookでPGAdminを使用してそのサーバーに接続しようとしています。

sshトンネルを作成しました-

macbook:~postgres$ ssh -L 5423:localhost:5432 postgres@mydomain.com

そして、私は期待通りにMacBookでpsqlを使用して接続できます-

macbook:~ me$ psql -U postgres -p 5423 -h localhost
...
postgres=#

PGAdminIIIの[新しいサーバー登録]ウィンドウで、次のクレデンシャルを入力しています

Name - MyServer
Host - localhost
Port - 5423
Maintenance DB - postgres
Username - postgres
Password - <remote_postgres_password>

ただし、接続は失敗します-

Error connecting to the server: FATAL: password authentication failed for user "postgres"

ここで何が起こっているのかわかりませんが、これらは私がpsqlに使用したのと同じクレデンシャルのようです。

4

1 に答える 1

0

サーバーで、ファイルmd5のパスワード認証として選択しpg_hba.confます。例えば:

host all all 12.34.67.89 255.255.255.255 md5

12.34.67.89あなたのリモートIPです。私は先週同じ問題に直面しています。お役に立てば幸いです。

于 2012-11-29T17:47:20.470 に答える