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妙用)
如果您觉得阅读本文对您有帮助,请点一下“推荐”按钮,您的“推荐”将是我最大的写作动力!欢迎各位转载,但是未经作者本人同意,转载文章之后必须在文章页面明显位置给出作者和原文连接,否则保留追究法律责任的权利。
原文链接:https://www.cnblogs.com/lzpong/p/15924491.html
--- auth:lzpong
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!