
Uploading Entire Directory find mydir -type f -exec /usr/local/opt/curl-openssl/bin/curl -user "USERNAME:PASSWORD" -ftp-create-dirs -T \ Uploading a file curl-ssl -T practice.txt sftp:// /home/USERNAME/practice-to-cheha.txt -user "USERNAME:PASSWORD"ĭownloading a file curl-ssl -o /PATH-TO-FILE/FILENAME sftp:// /CHEAHA-PATH/FILENAME -user "USERNAME:PASSWORD" # creates a file named practice.txtĮcho "Lorem ipsum dolor sit amet, consectetur adipiscing elit." > practice.txt Lets first create a file for us to practice with. Now you’re ready to use it! To use most of these commands, you’ll need to supply your username and password using the -user "USERNAME:PASSWORD" flag and the address needs to be your username followed by retrieve the directory listing for your home folder and to subsequently test if its working, curl-ssl -k sftp:// /home/USERNAME/ -user "USERNAME:PASSWORD" echo "alias curl-ssl='/usr/local/opt/curl-openssl/bin/curl'" > ~/.bash_profile To do this, we need to create an alias which will point to binary specific to curl-openssl, which for me was /usr/local/opt/curl-openssl/bin/curl. I didn’t want this installation to interfere with the native curl and wanted to instead use a separate command for using it. The native curl that comes with Mac does not support sftp connections, which is what we need in order to connect securely to Cheaha.

Homebrew if don’t already have it installed since we’re going to use it to install curl-openssl. However, being able to do this while still at the command line has saved me a ton of time.įor those who use Macs, here is how you do it.


For uploading and downloading files to Cheaha, I typically use Filezilla since it has a pretty seemless interface that walks you through everything you might need to connect to a specific server. I constantly work from the command line, and I find that I’m less productive whenever I need to leave it to use a different application.
