Q: open ssh server files automatically with apple script
Hello respected persons ,
i am trying to build a apple script which first open terminal login in ssh with details and after login it open a python script which is on ssh server automatically . i wanna do all of these tasks in a single apple script . i already tried to build automatic ssh login and i did . but i am facing problem how can i call a python script in ssh server automatically .
like i have a python file in ssh server /home/exe/ai.py
so i want each time i run that apple script it login in ssh and open ai.py automatically .
i am new in apple script please help
i am trying it fro 3 days but no luck please help me
MacBook Air, OS X El Capitan (10.11.1)
Posted on Feb 18, 2016 2:54 PM
At first glance, it sounds to me like you need to brush up on your ssh.
# ssh some.host python /home/exe/ai.py
will ssh to the specified host, and run the command 'python /home/exe/ai.py'.
To run this via AppleScript, put it in a do shell script command:
do shell script "ssh some.host python /home/exe/ai.py"
Posted on Feb 21, 2016 6:04 PM