In my Mac, I always get an error, but it doesn't seem to affect anything: I tried without the line breaks, and it doesn't work! It has to be EXACTLY this way, with the slashes and line breaks, so you'll have to copy these lines to a text editor, change the script, paste in terminal and press return.
#Sftp for mac stackoverflow code
Now, everything is installed! Go the folder you want to be synced, change this code to your needs, and type in Terminal: watchmedo shell-command Go the folder of Watchdog, and type in Terminal:
#Sftp for mac stackoverflow how to
First, I installed the libyaml dependency using Brew (there are lot's of help how to install Brew - like an "aptitude" for OS X). Run the script and verify if the messages are displayed correctly and the rsync actually sync your local folder with the remote folder.įinally, I downloaded and installed Watchdog from the Github page: Ĥ.1. Remember to give execution permission to this sh script. Rsync -azP ~/Sites/folder/ -message "Sync has finished"ģ.1. In this example, I'll call it ~/Scripts/sync.sh I used the ".sh extension, but I don't know if its needed. Save it anywhere you like, with the name you like. If an account field is not specified, and the FTP server requires it, the user will be prompted for it. If the password is not specified and the server requires it, ftp will prompt the user for it (after disabling local echo). Terminal-notifier -message "Starting sync"Ĭreate a sh script to test the rsync + notification. user user-name password account Identify yourself to the remote FTP server. Test if the notification works.In Terminal, type: I installed the Terminal Notifier from the Github page: Ģ.1. Ssh should login without passwords being asked :P Dreamhost (where my site is) does not allow afp mount, but allows Passwordless Login. When you finish, test if everything is ok… if you can't Passwordless Login, maybe you have to try afp mount. I created the key to Passwordless Login using this tutorial from Dreamhost wiki: ġ.1. Not needed, but helps to know when the sync has finished). In addition, OpenSSH provides a large suite of secure tunneling capabilities, several authentication methods, and sophisticated. It encrypts all traffic to eliminate eavesdropping, connection hijacking, and other attacks. Well, I had the same kind of problem and it is possible using these together: rsync, SSH Passwordless Login, Watchdog (a Python sync utility) and Terminal Notifier (an OS X notification utility made with Ruby. OpenSSH is the premier connectivity tool for remote login with the SSH protocol.