1

I know I can add tunneling to an existing ssh connection by using the EscapeChar : ~C and then the usual -L syntax. It works. What I'd like to do is to make this automatic when I log in. I cannot specify anything on the command line on the client side. So I have to do it serverside. The client connects as : ssh user@host. That's all. So now I add the tunnels myself once I'm logged in. I'd like to automate this. How an I launch the -L commands automatically when the ssh session starts ?

4

1 回答 1

0

每次连接时,您都可以使用.ssh/config客户端上的文件创建隧道,使用LocalForward关键字。请参阅此页面上的示例。

于 2014-08-14T13:54:48.143 回答