I have these 2 commands that I send to my server:
- cat ./script1.sh var1 var2 | ssh my_user@my_server.com - cat ./script2.sh var3 var4 | ssh my_user@my_server.com
This is a part of Gitlab CI, but this doesn't matter.
Is there any way to merge these 2 lines -- execute script1.sh and then script2.sh on a server? So that they'll execute within a single ssh connection.
Preferably without having to create an additional 3rd script that'll call those 2.