使用autossh进行反向连接

执行命令

autossh -M 4010 -fNR 8822:localhost:2222 root@remote_ip

参数解释

8822为远程服务器的监听端口,localhost:2222是本地监听端口地址,将访问远程服务器8822端口上的数据转发到本地2222端口上。

root@remote_ip是远程服务器的登录账号

Comments

comments powered by Disqus