This file contains 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
# In Diagnostics > Command Prompt, run: | |
mkdir -p /root/.ssh # Create a .ssh folder for the pfSense root user | |
ssh-keygen -t rsa -q -b 2048 -N "" -f /root/.ssh/id_rsa # Generate a public/private key pair for pfSense | |
cat /root/.ssh/id_rsa.pub # Get pfSense's public key for adding to the remote server | |
ssh -oStrictHostKeyChecking=no user@example.com # Add the remote host's host key to pfsense's "known_hosts" file | |
# Run this command in Diagnostics > Command Prompt | |
# and if it succeeds, add it as a cron job in Services > Cron | |
/usr/bin/scp -i /root/.ssh/id_rsa /cf/conf/config.xml user@backup.example.com:~/config-`date +\%Y-\%m-\%d`.xml 2>&1 | /usr/bin/logger -t config-backup |
OlderNewer