Transfer Files with iTerm sz/rz
6 Quick Steps

This is a quick guide on transferring files between your local system and a remote server.
1. Download iTerm:
2. Install lrzsz package in iTerm terminal
sudo brew install lrzsz
3. Add the following scripts to usr/local/bin in both local and remote server
4. Change Permission for iTerm scripts (both local & remote server)
chmod 777 iterm2-*
5. Set up iTerm2 triggers
- iTerm2’s [preference] -> [profile] -> [advanced] -> [triggers] -> [edit]
Regular expression: rz waiting to receive.\*\*B0100
Action: Run Silent Coprocess
Parameters: /usr/local/bin/iterm2-send-zmodem.shRegular expression: \*\*B00000000000000
Action: Run Silent Coprocess
Parameters: /usr/local/bin/iterm2-recv-zmodem.sh
6. Transfer files
- On receiving side: execute ‘rz’. This will open a prompt for you to select the file you are preparing to receive.
- On sending side: execute ‘sz’. This will open a prompt for you to select the file to send.
And voilà, if you’ve followed these simple steps, you should have successfully sent your file over to your remote server! Hope this helped at least 1 person. I had to reference several articles to get this done [listed below] so I decided to compile all of it into 1 article.