To transmit a file, sftp
syntax is:
get /A/B/abc.txt /C/D/
In contrast, scp
syntax for the same task is:
/A/B/abc.txt username@servername:/C/D/E/
Why don't we need username@servername
in case of sftp
?
Because when that sftp get command is used, you are already connected to the server. It would not be necessarily to tell it its own name again.
sftp
shell in the first place?scp user@server ...
without having to runssh
.