Scenario: You're at home, and you want
to connect to a mysql server on the other side of a firewall. There is
a machine with ssh open on it that you can use as a gateway.
On your home machine:
ssh -L 3307:domain.name.of.mysqlserver:3306 username@domain.name.of.gatewayserver
This will open a tunnel, listening on
localhost:3307 and forwarding everything to mysqlserver:3306, and doing
it all via the ssh service on the gateway machine.
This example shows us specifying port 3307 on the local end of
the tunnel; I did this because I run a MySQL server on my home machine,
so I can't re-use the default MySQL port.
You'll now have a terminal open on the gateway machine, but you don't need it for this procedure, so set it aside.
2. Now, on your local machine, execute a mysql connection like so:
mysql -u username -p -h 127.0.0.1 -P 3307 databasename
In other words, mysql thinks it's
connecting to localhost, but on a different port. In fact, the
connection is being made securely to the remote mysql server, via the
gateway machine and the local "mouth" of the ssh tunnel on your own
machine.
3. When you're finished with your mysql
session, log out of the session on the gateway machine. That will
properly close the tunnel.
分享到:
相关推荐
完全免费开源,软件直接在google 上即可下载,当 Mobaxterm 的开源版本不满足需求的时候,可以使用该软件作为替代。并且该软件很小,也才只有7M左右。
怎样用putty设置SSH tunnel 凡是不晓得SSH为何物的朋友可以略过,也可以google SSH开始了解它。这儿不重复了。
this is a free tunnel software, very portable, fast and eazy to use, please search the web for how to install, configure it.
在某些情况下,我们只能知道数据库的内网地址,无法通过内网连接,但是我们可以登录同一个内网的其他机器,并且这些机器能够在内网访问数据库,那么我们可以通过ssh tunnel的方法来访问数据库。 用法 ssh tunnel的...
Laravel开发-laravel-ssh-tunnel-fixed 轻松创建和维护Laravel/Lumen的SSH隧道
SSH的的Port Forward,中文可以称为端口转发,是SSH的一项非常重要的功能。它可以建立一条安全的SSH通道,并把任意的TCP连接放到这条通道中。
SSH隧道作为Kubernetes服务 创建一个Kubernetes服务/部署/ ConfigMap,以将SSH隧道作为... 下一步,您的Kubernetes集群应该有一个侦听端口3306的主机ssh-tunnel-service-mysql.svc.cluster.local 。 执照 麻省理工学院
用于管理SSH隧道的GUI
SSH终端,文件传输和隧道工具。 重点是在隧道内部运行隧道。 那必须跳过几台机器。 请参阅Wiki页面以获取文档。 https://sourceforge.net/p/doffensshtunnel/wiki/Home/
使用Qt 4管理SSH隧道的GUI。
RSTunnel(可靠的SSH隧道)使您可以在安全且加密的隧道中在两个网络之间的数据之间建立隧道。 它使用SSH连接两台计算机。 这将为您设置一个隧道,并确保其持续运行。
安装composer require stechstudio/laravel-ssh-tunnel组态所有配置都可以并且应该在.env文件中完成。 ; Process used to verify connection; Use bash if your distro uses nmap-ncat (RHEL/CentOS 7.x) TUNNELER_...
mysql_ssh_tunnel_example 侦听端口 8306 并通过 ssh 隧道连接到远程主机上的端口 3306。 然后通过隧道连接到远程 mysql 服务器并运行查询。
使用此文件配置ssh代理,配置git通过proxy访问github
资源来自pypi官网。 资源全名:django-ssh-tunnel-database-connector-0.3.5.tar.gz
mac版本SSH+Tunnel_16.07_xclient.info--安装xclient.info密码
Python编写实现SSH的反proxy Tunnel 具体描述可以看我的博客
ssh_tunnel
$ docker run -d -p 8080:8080 --name="tunnel" youssefkababe/ssh-tunnel 然后将您的浏览器或系统配置为使用您服务器的 IP 地址在端口 8080 上连接到您的 Socks 代理。 您可以像这样停止和启动隧道: $ docker ...