Full version:
$ scp -i ~/.ssh/id_rsa /path/to/file.zip [email protected]:/path/to/remote/dir
Short version:
Put this in your ~/.bashrc
or ~/.zshrc
upload_xyz_server () {
scp -i ~/.ssh/id_rsa $1 [email protected]:$2
}
Then source it . ~/.zshrc
or . ~/.bashrc
Usage:
upload_xyz_server /path/to/file.zip /path/to/remote/dir