On 11/16/2018 2:22 PM, 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?
Many ways, but if you lose the 'exec' and '&', you could launch a new terminal with each ssh session. When you want to close that one session, close the terminal holding it open. Now there are plenty of alternative ways -- could have a launch writte in shell or whatever that would keep track of which ones were running or not. Then you could select the session you want to kill from a menu in that script. You could just close that connection (control-d in the remote terminal session)... Etc, etc...boils down to how much work one is willing to put in to set it up and what type of overhead you can handle. -l -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org