Skip to content

Instantly share code, notes, and snippets.

@okalachev
Created May 16, 2021 09:21
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 okalachev/ddeaaca0490911f1f60409f43ebe7636 to your computer and use it in GitHub Desktop.
Save okalachev/ddeaaca0490911f1f60409f43ebe7636 to your computer and use it in GitHub Desktop.
Generate scp command for copying a file to host
#!/usr/bin/env bash
# Usage: copy <filename>
SSH=($SSH_CONNECTION)
echo scp $1 $(whoami)@${SSH[2]}:$(pwd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment