Skip to content

Instantly share code, notes, and snippets.

@takakd
Created April 5, 2020 05:42
Show Gist options
  • Save takakd/23c1cf2dc643bd223bb751fe42429cfc to your computer and use it in GitHub Desktop.
Save takakd/23c1cf2dc643bd223bb751fe42429cfc to your computer and use it in GitHub Desktop.
scp command.
#!/usr/bin/env bash
# Required: macOS 10.14.5
# copy local to remote
$ scp -i ~/.ssh/id_rsa -r /home/localuser/local_dir sshuser@<ip>:/home/remoteuser/dir_placed_local_dir/
# copy remote to local
$ scp -i ~/.ssh/id_rsa -r sshuser@<ip>:/home/remoteuser/remote_dir /home/localuser/dir_placed_remote_dir/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment