路由器stelnet的连接配置过程

路由器stelnet的连接配置过程

拓扑图

image
[a3]sys  //进入系统视图
[a3]sysname aa1 //给路由器改名为aa1

[aa1]interface GigabitEthernet 0/0/0 //进入gig0/0/0端口
    
[aa1-GigabitEthernet0/0/0]ip address 10.0.1.2 24 //在gig0/0/0端口下设置ip地址

[aa1-GigabitEthernet0/0/0]q //退出
    
[aa1]rsa local-key-pair create //建立stelnet登录秘钥
The key name will be: Host
% RSA keys defined for Host already exist.
Confirm to replace them? (y/n)[n]:y
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
       It will take a few minutes.
Input the bits in the modulus[default = 512]:
Generating keys...
.......++++++++++++
....................++++++++++++
..............++++++++
............++++++++

[aa1]user-interface vty 0 4  //进入vty 0 4视图下
    
[aa1-ui-vty0-4]authentication-mode aaa  //设置认证方式为aaa
    
[aa1-ui-vty0-4]protocol inbound ssh  //指定vty接口只支持ssh登录
 
[aa1-ui-vty0-4]aaa //进入aaa窗口下
    
[aa1-aaa]local-user mxg password cipher mxg privilege level 15 //设置用户和密码并设置权限为最高
[aa1-aaa]local-user mxg service-type ssh 指定账号只为ssh服务  
[aa1-aaa]q // 退出
    
[aa1]ssh user mxg authentication-type password //使用user命令创建新用户并指定认证方式为ssh

[aa1]stelnet server enable // 开启ssh服务

第一次登录的时候他会提示你输入ssh client first-time enable,你需要在客户端启用ssh

[aa2]ssh client first-time enable // 在aa1上面开启stelnet认证


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容