Pues aquí una pequeña ayuda :)
#!/bin/bash
############################################
# SCRIPT CREATED BY: Laura Mora i Aubert #
# SCRIPT DATE: 2015-07-05 #
# WEBSITE: https://blackhold.nusepas.com #
# INFO: Script that allows remote backup #
# of Mikrotik Routers. #
# tested on 5.x & 6.x routers #
# LICENSE: creative commons (by:sa) #
############################################
############################################
# INSTRUCTIONS #
############################################
# #
# 1. Generate ssh-keys on your server #
# cd ~/.ssh #
# sh-keygen -t dsa #
# #
# 2. Rename pubkey #
# cp .ssh/id_dsa.pub backupkey #
# #
# 3. Put the file on MKT Router #
# ftp x.x.x.x #
# ftp> bin #
# ftp> put backupkey #
# ftp> bye #
# #
# 4. Import pubkey in MKT Router #
# telnet x.x.x.x #
# [admin@mikrotik] /user ssh-keys #
# import user=admin #
# public-key-file=backupkey #
# #
# 5. Access with ssh to the MKT Router #
# #
# 6. [SCRIPT] Change USER and ID values #
# #
# 7. Run the script! #
# #
############################################
############################################
# OTHERS #
############################################
# #
# If you have bruteforce login rules, #
# add your backup server IP in the last #
# rule: src-address=!SERVERIP #
# #
############################################
# Change username
USER=admin
BACKUP_DIR="/root/backups/"
if [ ! -d "${BACKUP_DIR}" ]; then
mkdir -p ${BACKUP_DIR}
fi
cd ${BACKUP_DIR}
############################################
# Keep this structure, take care of the : #
# Increment the "n" with a number #
# ID[n]="RouterName:IPAddress:Port" #
…


