Any file can be transferred from one directory to another directory within the server using the cp command.

But transferring the files from one workstation to another workstation can be achieved by using either SCP or SFTP commands.

Both SCP and SFTP are responsible for transferring files from one server to another server and both SCP and SFTP uses SSH (Secure Shell) protocol to secure the data while transferring. However, the functionality and internal working are different. SFTP comes with few advantages compared to SCP.

SCP is purely built for transferring files between servers. Whereas SFTP can also list the contents in the directories, create directories, delete directories, delete files, etc.

Method: SFTP (Secure File Transfer Protocol)


  1. Using your institution’s assigned username, enter the following command: sftp [username]@[data centre]
  2. Enter your institution’s assigned password
  3. Choose directory (see directory folders): Enter cd [directory name or path]
  4. Enter put [myfile] (copies file from your local system to the server)
  5. Enter quit

Method: SCP (Secure Copy)


  1. Enter scp [myfile] [username]@[data center]:[directory name or path] (see directory folders)
  2. Enter the password when prompted

Transferring of files is not just confined to the command line. There is third party software used for transferring files from one workstation to another workstation.

Example: Filezilla can be used across all the OS. But, WinScp can be used only for windows.

That’s it about SCP and SFTP commands. Clap and share with your friends. Meet you on the next blog!! 💌

Aspiring DevOps Engineer