Terminate ssh remote connection

Asked

Viewed 123 times

0

I have the following script that opens a remote connection on the terminal:

xterm -e ssh -t user@IP  -p porta  "cd pasta && bash script.sh && exit ; bash"

How to get the connection terminated and the terminal closed after the script has been executed?

  • 1

    If you remove the part '&& Exit ; bash' you should do exactly what you want - run and quit.

  • @epx It’s just that I got this script on the net, thanks. it worked!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.