Loading... * 产生一个rsakey ``` ssh-keygen -t rsa -b 2048 -f admin -C "admin" ``` 注意:已有的linux里面的b可能是4096,交换机无法识别。 * 通过web界面登录交换机管理界面,从文件管理中上传admin.pub ![2024-03-29T06:12:49.png][1] * 新增本地admin账号 ``` local-user admin password cipher $c$3$6nilO+wOdgvkfAwZszmWLhLWOvV4fF5Is4IR authorization-attribute level 3 service-type ssh telnet terminal service-type ftp service-type web ``` * 导入刚刚web页面上传的admin.pub ``` public-key peer admin import sshkey flash:/admin.pub ``` * 配置admin账号使用public登录ssh,配置root使用密码登陆过 ``` ssh server enable ssh user root service-type all authentication-type password ssh user admin service-type all authentication-type publickey assign publickey admin work-directory flash:/ ``` * 参考 https://www.cnblogs.com/kscnchina/archive/2013/02/04/2892430.html [1]: https://www.sddts.cn/usr/uploads/2024/03/3784295536.png 最后修改:2024 年 05 月 11 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏