Skip to content

Instantly share code, notes, and snippets.

@FernE97
Last active August 29, 2015 13:57
Show Gist options
  • Save FernE97/9439019 to your computer and use it in GitHub Desktop.
Save FernE97/9439019 to your computer and use it in GitHub Desktop.
SSH site transfer commands
ssh username@<host-1>

cd path/to/directory

tar cvzf content.tgz ./

host-1 send to host-2

scp content.tgz username@<host-2>:/path/to/dest

or

host-2 pull from host-1

scp username@<host-1>:/path/to/directory/content.tgz ./

Extract the files

tar zxvf /path/to/directory/content.tgz -C /path/to/dest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment