I usually use the lrzsz tool to upload or download files from a server to my PC using Windows OS with CMD.
Then I tried using MacOS using the terminal to do the same