zoukankan      html  css  js  c++  java
  • 通过Frp进行远程连接

    frp通过ssh访问内网机器的时候,还ssh隧道转发还是很相似的,先简单写一下它的远程Windows

     服务器:

    [root@iZ1la3d1xbmukrZ ~]# tar -zvxf frp_0.31.1_linux_amd64.tar.gz
    frp_0.31.1_linux_amd64/
    frp_0.31.1_linux_amd64/frps_full.ini
    frp_0.31.1_linux_amd64/frps.ini
    frp_0.31.1_linux_amd64/frpc
    frp_0.31.1_linux_amd64/frpc_full.ini
    frp_0.31.1_linux_amd64/frps
    frp_0.31.1_linux_amd64/LICENSE
    frp_0.31.1_linux_amd64/frpc.ini
    frp_0.31.1_linux_amd64/systemd/
    frp_0.31.1_linux_amd64/systemd/frpc@.service
    frp_0.31.1_linux_amd64/systemd/frpc.service
    frp_0.31.1_linux_amd64/systemd/frps.service
    frp_0.31.1_linux_amd64/systemd/frps@.service
    [root@iZ1la3d1xbmukrZ ~]# cd frp_0.31.1_linux_amd64
    [root@iZ1la3d1xbmukrZ frp_0.31.1_linux_amd64]# ll
    total 21464
    -rwxrwxr-x 1 1000 1000 10608640 Jan  6 16:02 frpc
    -rw-rw-r-- 1 1000 1000     7447 Jan  6 16:04 frpc_full.ini
    -rw-rw-r-- 1 1000 1000      126 Jan  6 16:04 frpc.ini
    -rwxrwxr-x 1 1000 1000 11333632 Jan  6 16:02 frps
    -rw-rw-r-- 1 1000 1000     2514 Jan  6 16:04 frps_full.ini
    -rw-rw-r-- 1 1000 1000       26 Jan  6 16:04 frps.ini
    -rw-rw-r-- 1 1000 1000    11358 Jan  6 16:04 LICENSE
    drwxrwxr-x 2 1000 1000     4096 Jan  6 16:04 systemd
    [root@iZ1la3d1xbmukrZ frp_0.31.1_linux_amd64]# vim start.sh
    [root@iZ1la3d1xbmukrZ frp_0.31.1_linux_amd64]# chmod u+x start.sh
    [root@iZ1la3d1xbmukrZ frp_0.31.1_linux_amd64]# ./start.sh
    [root@iZ1la3d1xbmukrZ frp_0.31.1_linux_amd64]# netstat -nltp
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      31382/sshd
    tcp        0      0 0.0.0.0:2181            0.0.0.0:*               LISTEN      7840/java
    tcp        0      0 0.0.0.0:8848            0.0.0.0:*               LISTEN      13320/java
    tcp        0      0 0.0.0.0:38480           0.0.0.0:*               LISTEN      7840/java
    tcp6       0      0 :::7000                 :::*                    LISTEN      5243/./frps
    tcp6       0      0 :::8080                 :::*                    LISTEN      1677/docker-proxy-c
    [root@iZ1la3d1xbmukrZ frp_0.31.1_linux_amd64]#  

    脚本内容:

    [root@iZ1la3d1xbmukrZ frp_0.31.1_linux_amd64]# cat start.sh
    nohup ./frps -c frps.ini &>/dev/null &
    [root@iZ1la3d1xbmukrZ frp_0.31.1_linux_amd64]#
    

    Windows客户端:  

     启动,然后可以进行远程连接

    C:UsersasusDesktop玩frpfrp_0.31.1_windows_amd64>frpc.exe -c frpc.ini
    2020/05/07 22:22:52 [I] [service.go:250] [7b7a3f42df81197f] login to server success, get run id [7b7a3f42df81197f], server udp port [0]
    2020/05/07 22:22:52 [I] [proxy_manager.go:144] [7b7a3f42df81197f] proxy added: [ssh]
    2020/05/07 22:22:52 [I] [control.go:164] [7b7a3f42df81197f] [ssh] start proxy success
  • 相关阅读:
    Overloaded的方法是否可以改变返回值的类型
    parseXXX的用法
    java的类型转换问题。int a = 123456;short b = (short)a;System.out.println(b);为什么结果是-7616?
    UVA 10405 Longest Common Subsequence(简单DP)
    POJ 1001 Exponentiation(大数处理)
    POJ 2318 TOYS(计算几何)(二分)
    POJ 1265 Area (计算几何)(Pick定理)
    POJ 3371 Flesch Reading Ease (模拟题)
    POJ 3687 Labeling Balls(拓扑序列)
    POJ 1094 Sorting It All Out(拓扑序列)
  • 原文地址:https://www.cnblogs.com/dalianpai/p/12846270.html
Copyright © 2011-2022 走看看