Sunday, December 01, 2013

Difference between SSH and SCP

- Both SSH and SCP are used to exchange data between the computers within a network securely, based on public key encryption.


- SSH protocol is for creating a secure encrypted channel between a pair of remote devices, while SCP protocol is for transferring files between a pair of hosts securely. As SCP uses SSH connection for its operation, both SSH and SCP protocols are alike but there are some key differences.


- SSH protocol is widely used for logging into remote systems and for controlling remote systems, while SCP protocol is used to transfer files among remote computers in a network.


- When the user does not know the exact location of a file that is needed to copy using SCP, he/she can first establish the connection to the remote server using SSH, find the path using ‘cd’ and ‘pwd’ commands and then use the full path to copy file using SCP. This is because SCP protocol cannot be used to run a command on a remote server but the SSH protocol can be used to execute the remote commands.