2015-01-05 98 views
0

我有PostgreSQL 9.4运行在Linux VPS上,我需要能够通过SSH连接到它从Linux和Windows客户端。 (我以后需要连接到多个服务器,并且所有客户端使用相同的端口号,我将转发到第一台服务器的端口5551,然后我将使用5552,5553等)。一个Linux客户端,我只需运行ssh -fNg -L 5551:localhost:5432 [email protected]并使用PGAdmin3或任何其他客户端应用程序连接到localhost:5551。很棒。PostgreSQL SSH端口转发通过Windows/PuTTY

在Windows上,我使用了PuTTY和Pageant。我通过终端工作得到了[email protected]的连接,然后我去了SSH隧道并添加了L5432 localhost:5551。终端连接仍然工作,但是当我尝试连接PGAdmin3到localhost:5551时出现错误:

could not connect to server: Connection refused (0x0000274AD/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5551?

回答

0

我解决了它。像许多事情一样,事后看来这很明显。我在PuTTY的SSH隧道设置中后退了一些事情。它需要是L5551 remote1.com:5432