-
-
Save sharkoz/5427041 to your computer and use it in GitHub Desktop.
[Shell] Secure copy to another server using own logname
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
put(){ txt=$(logname); scp "$1" ${txt}@serveradress:/home/path/; }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To change the permissions on the remote file :
rsync --chmod=u+rwx,g+rwx,o+rwx /path/to/file server:/path/to/file