Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6jvX-0000in-QZ for pgsql-sql@arkaria.postgresql.org; Fri, 24 Jan 2014 16:48:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W6jvX-0006kd-78 for pgsql-sql@arkaria.postgresql.org; Fri, 24 Jan 2014 16:48:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6jvW-0006kU-55 for pgsql-sql@postgresql.org; Fri, 24 Jan 2014 16:48:18 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6jvP-0006wm-31 for pgsql-sql@postgresql.org; Fri, 24 Jan 2014 16:48:17 +0000 Received: by mail-pa0-f53.google.com with SMTP id lj1so3465308pab.12 for ; Fri, 24 Jan 2014 08:48:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Cj/3whf7Z8uY2ydnlFytGajhTd1Agz9hWIb20BPNzT4=; b=nX72exYa+WwDZbR0XoAw4yp99fw0LFL9QBhiqWzW5RDyY/ppzkmf5P6k2bm5QmwrCQ BmD3m9Bz7bwQp7Zp9xS+/iEmttw2K9xHfsoNwFXgGvgbCjdDmT7NszTlnps9A1ErThVV cY9OzuzAwTf02HO24FrOAdZ7u2eRtbNGzaolGlOYldVHKT/2AZee45AOWFx9Xtk1qSyh 295yWoTO3L5eBl00k99ttMtNBySCu28eUrLhNYBBZ0SXJ68NuH8Tz5llfqnEw1EnwxZ7 DDtR40N/4VCSYwT7qertYIv6cLZ5eN+JTRMgdJfUCLA7j7roiC1B3sgOdrYpOe8VhUEq gECA== X-Received: by 10.66.146.199 with SMTP id te7mr15477216pab.106.1390582084233; Fri, 24 Jan 2014 08:48:04 -0800 (PST) Received: from panda.site (65-102-187-8.tukw.qwest.net. [65.102.187.8]) by mx.google.com with ESMTPSA id cz3sm4719097pbc.9.2014.01.24.08.48.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Jan 2014 08:48:03 -0800 (PST) Message-ID: <52E29940.5010200@gmail.com> Date: Fri, 24 Jan 2014 08:48:00 -0800 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: "minsheng.bai" , pgsql-sql Subject: Re: consulting the question about the usage about SSH Tunnel function References: <201401241006209142667@wellintech.com> In-Reply-To: <201401241006209142667@wellintech.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On 01/23/2014 06:06 PM, minsheng.bai wrote: > dear all > i have realized the SSH Tunnel function in the PostgreSQL.i did some > work as follow: > at the server side: > 1.setup and configure the openssh > 2.start opensshd > 3.setup and deploy PostgreSQL > at the client side: > 1.setup openssh > 2.execute command£ºssh -L5555:localhost:5432 > Administrator@XXX.XXX.XXX.XXX(the > server IP) > 3.use psql or pgAdmin to connect the server. > i succeed. > but i have a question: > if i do not execute command:ssh -L5555:localhost:5432 > Administrator@XXX.XXX.XXX.XXX > but i config the SSH Tunnel tab in the pgAdmin,as follow: > whether i can connect the server or not .the result i try is failed. > anyone can help me? thanks a lot. I should have explained more in my previous post. In your command line you have: ssh -L5555:localhost:5432 I am assuming you then use 5555 as the port number in your connection string from psql or pgAdmin and the connection succeeds. When you set up the tunnel from pgAdmin I am not seeing a setting for the listening port. So the solution is to either find some way to specify the port from the pgAdmin dialog or find the port that pgAdmin is setting on its own. My previous suggestion was an attempt at forcing the port to one you have been using. Not sure if that will work. In the event it does not you could see if you can find what port is actually being used and adjust your connection strings accordingly. > ------------------------------------------------------------------------ > minsheng.bai -- Adrian Klaver adrian.klaver@gmail.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql