How can I connect Linux server with Applescript using iTerm or Terminal?
Applescript

You can execute shell commands directly from Applescript

do shell script "ssh user@linuxbox command-to-run"


Automator

You can create a new workflow and insert the necessary shell commands into the "Execute shell script" action.