(原)使用Holer公网SSH访问内网(局域网)Linux系统

Holer exposes local servers behind NATs and firewalls to the public internet over secure tunnels. 
Support forwarding message based on TCP protocol.

Holer是一个免费开源的内网穿透工具,它可以将局域网服务器代理到公网的内网穿透工具,支持转发基于TCP协议的报文。

Holer地址:https://github.com/Wisdom-Projects/holer

2. 使用Holer公网SSH访问内网(局域网)Linux系统

2.1.下载软件包并解压:

软件包地址:https://github.com/Wisdom-Projects/holer/tree/master/Binary

下载完ftp/sftp上传至内网(局域网)的Linux系统上

解压软件包: unzip holer-client.zip

 

2.2. 修改配置文件

vim holer-client/conf/holer.conf

公网和内网的地址映射关系

Holer Access KeyInternet AddressLocal Address
HOLER_CLIENT-822404317F9D8ADDholer.org:65534127.0.0.1:22
   

内网(局域网)Linux的sshd 默认服务端口是22,选择记录里的Holer Access Key配置到holer-client/conf/holer.conf文件里

HOLER_ACCESS_KEY=HOLER_CLIENT-822404317F9D8ADD
 
 

 

2.3. 启动Holer服务

cd holer-client/bin
 
 

Linux系统执行命令: sh startup.sh

 

 

2.4. 公网访问Linux系统

使用ssh客户端工具MobaxTerm,输入如下命令就可以访问内网(局域网)的Linux系统了

ssh root@holer.org -p 65534
 
 

成功登录示例:


 
 
  1. ssh root@holer.org -p 65534
  2. root@holer.org 's password:
  3. [root@ip -172 -31 -19 -0 ~] #
  4. [root@ip -172 -31 -19 -0 ~] # ifconfig
  5. eth0: flags= 4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9001
  6.         inet 172.31 .19 .0  netmask 255.255 .240 .0  broadcast 172.31 .31 .255
  7.         inet6 fe80:: 56: 7ff:fe0f: 782  prefixlen 64  scopeid 0x20<link>
  8.         ether 02: 56: 07: 0f: 07: 82  txqueuelen 1000  (Ethernet)
  9.         RX packets 88018  bytes 126478017 ( 120.6 MiB)
  10.         RX errors 0  dropped 0  overruns 0  frame 0
  11.         TX packets 18631  bytes 1857449 ( 1.7 MiB)
  12.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  13. lo: flags= 73<UP,LOOPBACK,RUNNING>  mtu 65536
  14.         inet 127.0 .0 .1  netmask 255.0 .0 .0
  15.         inet6 :: 1  prefixlen 128  scopeid 0x10<host>
  16.         loop  txqueuelen 1000  (Local Loopback)
  17.         RX packets 178  bytes 26469 ( 25.8 KiB)
  18.         RX errors 0  dropped 0  overruns 0  frame 0
  19.         TX packets 178  bytes 26469 ( 25.8 KiB)
  20.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  21. [root@ip -172 -31 -19 -0 ~] #
                </div>
</article>
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值