How to edit crontab file present in the remote UNIX server ...
stackoverflow.com › questions › 46564064Oct 04, 2017 · Show activity on this post. I am having a crontab entry in my Python code describing which script should be scheduled in the UNIX remote server at the specified time. I am writing a Python script which will connect to the ssh using Paramiko, it will go to the specified crontab file path in the remote server -> open the crontab file -> add the crontab entry specified in the Python script at the end of the file (on the new line) -> save & exit the crontab file.
How to make changes/edit on a file present on remote server ...
stackoverflow.com › questions › 55044243Mar 07, 2019 · from fabric import Connection as connection, task @task def executeTask(ctx): with connection(host=dev_server, user=myuser) as c: c.put('PATH_TO_YOUR_YML_FILE_LOCALLY', 'PATH_TO_YOUR_REMOTE_YML_FILE') Don't forget to : Replacedev_server and myuser with the remote server IP and username on it ; put the code above in a file called fabfile.py and you run from your command line fab executeTask; The code above is fabric 2.4 compatible . EDIT: Because of permissions issue you can do the following :