更新时间:2023-01-20 07:37:33
是的,这是可能的.例如.在 Linux 上,运行
Yes, it's possible. E.g. on Linux, run
ssh -N -Llocalport:dbserver:dbport yourname@connectionserver
哪里
同样可以在 Windows 上使用 Plink(Putty 附带)来完成:
The same can be done on Windows using Plink (which comes with Putty):
plink -N -L localport:dbserver:dbport yourname@connectionserver
在两台机器(您的本地机器和您有权访问的服务器)上执行此操作以链接 ssh 隧道.示例:
Do this on both machines (your local machine and the server you have access to) to chain the ssh tunnels. Example:
连接服务器(假设为 Linux):
Connection server (assuming Linux):
ssh -N -L1521:dbserver:1521 dblogin@dbserver
您的电脑:
plink -N -L 1521:connectionserver:1521 connlogin@connectionserver
tnsnames.ora 条目必须看起来像您正在运行本地数据库,例如
The tnsnames.ora entry must look like you are running a local database, e.g.
prodoverssh =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = prod)
)
)