• plink 转发本地端口到远端端口


    转发本地 `51538` 端口 到 服务器的 `3306` 端口

    ssh 端口默认 22 , 如果不是则要加参数指定端口 ` -P xx`

    plink -N -L 51538:localhost:3306  root@139.xxx.xx.xxx  -pw jhs6f3

    参数:

    Plink: command-line connection utility
    Release 0.76
    Usage: plink [options] [user@]host [command]
           ("host" can also be a PuTTY saved session name)
    Options:
      -V        print version information and exit
      -pgpfp    print PGP key fingerprints and exit
      -v        show verbose messages
      -load sessname  Load settings from saved session
      -ssh -telnet -rlogin -raw -serial
                force use of a particular protocol
      -ssh-connection
                force use of the bare ssh-connection protocol
      -P port   connect to specified port 指定ssh连接端口
      -l user   connect with specified username
      -batch    disable all interactive prompts
      -proxycmd command
                use 'command' as local proxy
      -sercfg configuration-string (e.g. 19200,8,n,1,X)
                Specify the serial configuration (serial only)
    The following options only apply to SSH connections:
      -pw passw login with specified password 指定ssh登陆密码
      -D [listen-IP:]listen-port
                Dynamic SOCKS-based port forwarding 监听本地端口动态代理到服务器(代理上网)
      -L [listen-IP:]listen-port:host:port
                Forward local port to remote address 监听本地端口,转发数据到远程端口
      -R [listen-IP:]listen-port:host:port
                Forward remote port to local address 监听远程端口,转发数据到本地端口
      -X -x     enable / disable X11 forwarding
      -A -a     enable / disable agent forwarding
      -t -T     enable / disable pty allocation
      -1 -2     force use of particular SSH protocol version
      -4 -6     force use of IPv4 or IPv6
      -C        enable compression
      -i key    private key file for user authentication
      -noagent  disable use of Pageant
      -agent    enable use of Pageant
      -no-trivial-auth
                disconnect if SSH authentication succeeds trivially
      -noshare  disable use of connection sharing
      -share    enable use of connection sharing
      -hostkey keyid
                manually specify a host key (may be repeated)
      -sanitise-stderr, -sanitise-stdout, -no-sanitise-stderr, -no-sanitise-stdout
                do/don't strip control chars from standard output/error
      -no-antispoof   omit anti-spoofing prompt after authentication
      -m file   read remote command(s) from file
      -s        remote command is an SSH subsystem (SSH-2 only)
      -N        don't start a shell/command (SSH-2 only) 不启动shell功能
      -nc host:port
                open tunnel in place of session (SSH-2 only)
      -sshlog file
      -sshrawlog file
                log protocol details to a file
      -logoverwrite
      -logappend
                control what happens when a log file already exists
      -shareexists
                test whether a connection-sharing upstream exists
    

    (PS: Putty小工具Plink妙用)

  • 相关阅读:
    在MaxCompute中配置Policy策略遇到结果不一致的问题
    通过DataWorks数据集成归档日志服务数据至MaxCompute进行离线分析
    阿里小二的日常工作要被TA们“接管”了!
    2018年DDoS攻击全态势:战胜第一波攻击成“抗D” 关键
    基于OSS+DataLakeAnalytics+QuickBI的Serverless的查询分析和可视化BI
    威胁快报|首爆,新披露Jenkins RCE漏洞成ImposterMiner挖矿木马新“跳板”
    Lesson 7 Nehe
    Lesson 7 Nehe
    Lesson 7 Nehe
    Lesson 6 Nehe
  • 原文地址:https://www.cnblogs.com/lzpong/p/15924491.html
Copyright © 2020-2023  润新知