RouterOS导入key登陆ssh

Linux或者Mac OS生成一个key

ssh-keygen -t rsa

用scp上传到Mikrotik

scp -P端口 ~/.ssh/id_rsa.pub admin@10.0.100.1:id_rsa.pub

在Mikrotik内导入key

[admin@MikroTik] > /user ssh-keys import public-key-file=id_rsa.pub user=admin

打印查看

[admin@MikroTik] > /user ssh-keys print
Flags: R - RSA, D - DSA        
 #   USER                       BITS KEY-OWNER        
 0 R admin                      2048 XXXXXXX

添加新评论 »