SCP with SSH Config File
When you use the SSH config file, the scp
command becomes much simpler. You can skip typing the private key file path, remote server user name and IP address.
Transferring from local to remote
Only three sets of information are needed for the command.
Source file
- Source file or directory on your local computer (if you want to transfer a directory, use the
-r
option.)
Destination
- SSH host name in your SSH config file
- Destination directory path on the remote server (If you want to transfer the file to the user's home directory of the remote server, you can skip this argument.)
For a better understanding, please go through the following practice section.
Practice 1
Objective:
Transfer a file from the local computer to the remote server using the SSH config file
The following are the paths of the file to be transferred and the destination direct
Subscribe now for
uninterrupted access.