When I want to stop tail -f I press CTRL+C and return to prompt.But when I run ssh connection the CTRL+C breaks the connection. (meanings of flags described here)ssh -t svf cd ~/w/logs; tail -f some_file.log; exec $SHELL -lthis post does not describes how to prevent remote shell to exit for ssh -t remotehost command args ...How to stop command (in this example tail -f) with CTRL+C and do not break ssh connection?
How to prevent CTRL+C to break ssh connection?
bash;ssh