Skip to content

Instantly share code, notes, and snippets.

@Saigesp
Last active January 27, 2021 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Saigesp/6ee05956809773e79c7ff9e0433bcb20 to your computer and use it in GitHub Desktop.
Save Saigesp/6ee05956809773e79c7ff9e0433bcb20 to your computer and use it in GitHub Desktop.
SSH useful commands

SSH Useful commands

SCP Commands

Copy file from local to remote

scp file.txt <user>@<server>:/path/to/remote/folder

Copy folder from local to remote

scp -r /path/to/local/folder <user>@<server>:/path/to/remote/folder

Copy folder from local to remote with ssh key

scp -i ~/.ssh/id_rsa.pub -P <port> -r /path/to/local/folder/ <user>@<server>:/path/to/remote/folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment