X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 7FACE9DCCAF for ; Wed, 15 Feb 2006 22:00:47 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83772-02 for ; Wed, 15 Feb 2006 22:00:51 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 62F939DCCA9 for ; Wed, 15 Feb 2006 22:00:45 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k1G20fr1021928; Wed, 15 Feb 2006 21:00:41 -0500 (EST) To: David.Bear@asu.edu cc: Peter Eisentraut , pgsql-admin@postgresql.org Subject: Re: hba conf ident sameuser not working In-reply-to: <20060216003610.GD11620@asu.edu> References: <20060215031605.GH14507@asu.edu> <200602151127.36955.peter_e@gmx.net> <20060216003610.GD11620@asu.edu> Comments: In-reply-to David Bear message dated "Wed, 15 Feb 2006 17:36:10 -0700" Date: Wed, 15 Feb 2006 21:00:41 -0500 Message-ID: <21927.1140055241@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.11 required=5 tests=[AWL=0.110] X-Spam-Score: 0.11 X-Spam-Level: X-Archive-Number: 200602/194 X-Sequence-Number: 20615 David Bear writes: > now, back on teancum that has the tunnel on port 6666, I do this: > iddwb@teancum:~> psql -p 6666 -h localhost -U tlhowell > psql: FATAL: Ident authentication failed for user "tlhowell" > iddwb@teancum:~> psql -p 6666 -h localhost -U iddwb > psql: FATAL: Ident authentication failed for user "iddwb" I'm afraid you're kind of stuck on getting that to work. In the cases that work, psql is executing on the server side of the ssh connection. Here, you want it to work on the client side. The problem is that the Postgres server is going to see that TCP connection as originating from a server-side sshd daemon process, and so ident is quite properly going to fail unless the requested database username matches whatever sshd is running as. You could possibly get it to work if you could get sshd to run the daemon subprocess as yourself instead of root ... dunno enough about ssh to know if that's possible. regards, tom lane