--- Title: Fun with scp Date: 2022-04-15 Sequence: Tags:  ---
Not that scp but the linux scp :)
I never quite remember how to use scp so I figure I should write down the 3 most common things I do that scp would be helpful for.
Copying a file from somewhere else:
> scp firstname.lastname@example.org:/path/to/file.txt ./
Copying a directory from somewhere else:
> scp -r email@example.com:/path/to/folder ./
Coping a file from here to there:
> scp file.txt firstname.lastname@example.org:/home/nivethan/temp
Coping a directory from here to there:
> scp -r folder email@example.com:/home/nivethan/temp
You can use `\-q` to silence the messages but this also silences errors.
You can also use sshpass to automate the password entry.
> sshpass -p "password" scp firstname.lastname@example.org:/path/to/file.txt ./