ssh -qTfnN -D 7070 remotehost.
All the added options are for a ssh session that’s used for tunneling.
-q :- be very quite, we are acting only as a tunnel.
-T :- Do not allocate a pseudo tty, we are only acting a tunnel.
-f :- move the ssh process to background, as we don’t want to interact with this ssh session directly.
-N :- Do not execute remote command.
-n :- redirect standard input to /dev/null.
All the added options are for a ssh session that’s used for tunneling.
-q :- be very quite, we are acting only as a tunnel.
-T :- Do not allocate a pseudo tty, we are only acting a tunnel.
-f :- move the ssh process to background, as we don’t want to interact with this ssh session directly.
-N :- Do not execute remote command.
-n :- redirect standard input to /dev/null.
本文介绍了一种使用SSH进行隧道配置的方法。通过特定选项(-q, -T, -f, -N, -n)的组合使用,可以实现静默模式、不分配伪tty、后台运行、不执行远程命令以及重定向标准输入到/dev/null等功能,从而实现高效的SSH隧道建立。
796

被折叠的 条评论
为什么被折叠?



