Different Ways of File transfer to a remote server using ssh protocol.
Scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.
Using scp from destination server
scp root@source_server:/path/to/file /path/here/ scp -P 2222 root@source_server:/path/to/file /path/here/ #with ssh port 2222 scp -r root@source_server:/path/to/directory/ /path/here/ #copy entire directory
Using scp from source server