Code: Select all
ssh 192.168.88.1 "/file print file=mykey; file set mykey contents=\"`cat ~/.ssh/id_rsa.pub`\";/user ssh-keys import public-key-file=mykey.txt;/ip ssh set always-allow-password-login=yes"
Another tip is you can ssh into Routeros with username+ct@router instead of just username@router, then login will be even quicker. Add "user myname+ct" under "host router" section in /etc/ssh_config to make it the default. Also
Code: Select all
/print detail