FTP or File Transfer Protocol and SFTP or Secure File Transfer Protocol are some of the most widely used protocols for transferring the files between any local device and the remote servers. Let’s know the method to this on MAC terminal with the help of the below guide.
Although built in the devices that help to carry on the whole relation between the servers and the local devices, if you are owning any Mac device, you can also take advantage of some built-in powerful tools to behave like FTP and SFTP clients.
This can be done by using Mac’s terminal. After that, you can actually carry on the various tasks like uploading, downloading, canceling transfers, etc., from the servers to your device.
Although some other FTP clients could do that all but don’t want to use them and go with Terminal of the Mac-only, which below in this article is to know how you can make it act like an FTP/SFTP client.
Steps to Use the Mac Terminal as an FTP or SFTP Client
For using SFTP, you will need to have SSH access to your remote servers unless you have to go with the FTP only which is either not safe for the purposes. Follow the below steps to proceed.
1.The very first thing that you will need is to log in to the FTP or SFTP server using the username and password; if you don’t have any, then you should prefer to get the one, although FTP can allow you to enter with an anonymous username/ password combination. Note that you will have to execute the command differently for SFTP and FTP in whichsoever you are logged in.
To log in using FTP in the Terminal, use the command: “FTP server_ip,” type in the username, hit enter, and then type in the password and again hit enter.
To login using SFTP in the Terminal, use the command: “sftp [email protected]_ip,” put your username in the command, and then when asked, fill up your password and hit enter.
2. Now after you are successfully logged in to your FTP/SFTP accounts, you would like to perform some of the tasks like downloading files, uploading files etc. For all these, you will have to follow below commands:
# Upload Files: “put path remote_file_name” for eg. “put /Users/hs11/tell.txt tell.txt” will upload the tell.txt file
# Download Files: “get path local_file” for, e.g., “get tell.txt tell.txt” will download the tell.txt file to the working directory of the Mac
# Create Folders On Remote Directory: ” mkdir directort_name” for, e.g., “mkdir tell” will create a new folder named tell on the remote server
# Rename Remote Folders: ” rename old_name new_name” put in the old name and new name to get the changes to appear
#Delete Files: Using FTP, “delete file_name” put in the file name in the command, and it will be deleted after you execute the command in the Mac terminal
Using SFTP: “rm file_name” put in the file name in the command and it will be deleted after you execute the command in the Mac terminal.
3. You can now perform all these simple tasks on the remote servers by executing the above particular commands through the Mac terminal; hence it will act as an FTP/SFTP client.
And this was the method through which you can easily make your Mac Terminal act like an FTP/SFTP client and hence do the various types of transactions with the remote servers like downloading, uploading files etc. So just follow the above article and make your Mac terminal work like a FTP/SFTP client.