Use mac terminal as FTP server
Use mac terminal as FTP server

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. Lets know the method to this on MAC terminal with help of below guide.

These technologies are although built in the devices which help to carry on the whole relation between the servers and the local devices, but if you are owning any Mac device then you can also take advantage of some built-in powerful tools to behave like FTP and SFTP clients. This can be done through using the terminal of the Mac and after that, you can actually carry on the various tasks like uploading, downloading, canceling transfers etc from the servers to your device. Although there are some other FTP clients that could do that all but if you don’t want to use them and go with Terminal of the Mac only then follow up the method below in this article to know how you can make it act like FTP/SFTP client.

Also Read: How to Easily Create a PDF Document on your MAC

How 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.

Also Read: How to Securely Delete Sensitive Documents and Files on your MAC

Steps To use the Mac Terminal as an FTP or SFTP Client:

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 anonymous username/ password combination. Note that you will have to execute the command differently for SFTP and FTP in which so ever you are logged in.

To login using FTP in the Terminal, use the command: ftp server_ip“, type in the username and 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

Use mac terminal as FTP server
Use mac terminal as FTP server

# Download Files: “get path local_file” for eg. “get tell.txt tell.txt” will download the tell.txt file to the working directory of the Mac

Use mac terminal as FTP server
Use mac terminal as FTP server

# Create Folders On Remote Directory: ” mkdir directort_name” for eg. “mkdir tell” will create a new folder named tell on the remote server

Use mac terminal as FTP server
Use mac terminal as FTP server

# Rename Remote Folders: ” rename old_name new_name” put in the old name and new name to get the changes appear

Use mac terminal as FTP server
Use mac terminal as FTP server

#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 Mac terminal

Use mac terminal as FTP server
Use mac terminal as FTP server

Using SFTP: “rm file_name” put in the file name in the command and it will be deleted after you execute the command in Mac terminal

Use mac terminal as FTP server
Use mac terminal as FTP server

3. You can now perform all these simple tasks on the remote servers just through executing the above particular commands through the Mac terminal hence it will act like a FTP/SFTP client.

Also Read: How to Prevent Apps from Accessing Internet on MAC

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. Just follow the above article and make your Mac terminal work like a FTP/SFTP client.



AUTHOR

Karanpreet Singh is the Co-Founder of Techviral. He writes about how to, tutorials especially on Android, iPhone, Computer, Internet, Social Networks, etc. Apart from this, he is an Ec-Council CEH (Certified Ethical Hacker) and a Digital Marketing Expert. He loves to share his knowledge with others through blogging.