![SSH 隧道中的 -ssh 是什么意思](https://linux22.com/image/659890/SSH%20%E9%9A%A7%E9%81%93%E4%B8%AD%E7%9A%84%20-ssh%20%E6%98%AF%E4%BB%80%E4%B9%88%E6%84%8F%E6%80%9D.png)
我所在公司的一名前员工已经建立了 SSH 隧道,但我遇到了一些困难。
echo y | plink.exe -ssh -R 24011:localhost:1433 [email protected]
我的理解是,这是在本地机器上创建一个反向 SSH 隧道,监听端口 24011。我的问题是“-ssh”指的是什么。我到处搜索过,但搜索查询的性质使得很难找到任何有意义的信息。
答案1
-ssh
强制 plink 使用 SSH 协议。可以省略。已找到这里:
Z:\sysosd>plink
PuTTY Link: command-line connection utility
Release 0.53
Usage: plink [options] [user@]host [command]
("host" can also be a PuTTY saved session name)
Options:
-v show verbose messages
-load sessname Load settings from saved session
-ssh -telnet -rlogin -raw
force use of a particular protocol (default SSH)
-P port connect to specified port
-l user connect with specified username
-m file read remote command(s) from file
-batch disable all interactive prompts
The following options only apply to SSH connections:
-pw passw login with specified password
-L listen-port:host:port Forward local port to remote address
-R 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 protocol version
-C enable compression
-i key private key file for authentication