On 2018-11-16 23:22, Carlos E. R. wrote:
Hi,
on my laptop I use a script that launches several lines like this to connect to my home server:
exec ssh -L 127.0.0.1:60000:192.168.X.Y:80 -N user@host &
It works fine. The problem is killing that connection. What I do is "killall ssh", but perhaps there is another way I have not thought about? I mean, kill that ssh session and not another?
You could create a link for every ssh tunnel. Something that uniquely identifies the tunnel. # ln -s /usr/bin/ssh /usr/bin/ssh_192.168.X.Y $ exec ssh_192.168.X.Y -L 127.0.0.1:60000:192.168.X.Y:80 -N user@host & $ killall ssh_192.168.X.Y -- /bengan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org