RouterOS and SSH

I got 6 Mikrotik RouterOS devices in active use now. 4 more which are not used. Time to make backups of their configs…

Setting up ssh keys

scp id_rsa.pub admin@ROUTER:
ssh admin@ROUTER
# Then enter those commands
/user ssh-keys import file=id_rsa.pub user=admin
/file remove id_rsa.pub
/quit

Making a config dump

ssh admin@ROUTER "/export compact terse file=configdump.rsc"
scp admin@ROUTER configdump.rsc ROUTER-config.rsc

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create your website at WordPress.com
Get started
%d bloggers like this: