Difference between scp and sftp

SCP is the abbreviation of ‘secure copy’, while SFTP stands for ‘secure FTP’. The first is used to copy one or more files, often with known names, from host A to host B, whereas the second is mostly used interactively, analogue to an FTP client. SCP will always work out of the box and has … Read more

scp or sftp copy multiple files with single command

Copy multiple files from remote to local: $ scp your_username@remote.edu:/some/remote/directory/\{a,b,c\} ./ Copy multiple files from local to remote: $ scp foo.txt bar.txt your_username@remotehost.edu:~ $ scp {foo,bar}.txt your_username@remotehost.edu:~ $ scp *.txt your_username@remotehost.edu:~ Copy multiple files from remote to remote: $ scp your_username@remote1.edu:/some/remote/directory/foobar.txt \ your_username@remote2.edu:/some/remote/directory/ Source: http://www.hypexr.org/linux_scp_help.php

What port does SFTP use?

While TCP port 22 is the general right answer, this is dependent on the fact that SSH is configured to use the standard port and not an alternative port. As SFTP runs as a subsystem of SSH it runs on whatever port the SSH daemon is listening on and that is administrator configurable.