Automate scp file transfer using a shell script
Instead of hardcoding password in a shell script, use SSH keys, its easier and secure. $ scp -i ~/.ssh/id_rsa *.derp devops@myserver.org:/path/to/target/directory/ assuming your private key is at ~/.ssh/id_rsa and the files you want to send can be filtered with *.derp To generate a public / private key pair : $ ssh-keygen -t rsa The above … Read more