HCIA-5-SSH

实验目的
server端配置ssh服务,client端访问
拓扑图
在这里插入图片描述

配置IP
[server-ui-vty0-4]int g0/0/0
[server-GigabitEthernet0/0/0]ip address 192.168.1.1 24

[client]int g0/0/0
[client-GigabitEthernet0/0/0]ip address 192.168.1.3 24

添加用户认证AAA

[server]aaa
[server-aaa]local-user huawei password cipher huawei
Info: Add a new user.
[server-aaa]local-user huawei privilege level 15
[server-aaa]local-user huawei service-type ssh

设置使用vty方式登录

[server-aaa]user-interface vty 0 4
[server-ui-vty0-4]authentication-mode aaa
[server-ui-vty0-4]user privilege level 15
[server-ui-vty0-4]protocol inbound ssh

开启服务设置SSH登录方式

[server]stelnet server enable
Info: Succeeded in starting the STELNET server.
[server]ssh user huawei authentication-type password
 Authentication type setted, and will be in effect next time

客户端通过SSH访问
[client-GigabitEthernet0/0/0]stelnet server enable //初次访问需要设置
The STELNET server is already started.
[client]stelnet 192.168.1.1
Please input the username:huawei
Trying 192.168.1.1 …
Press CTRL+K to abort
Connected to 192.168.1.1 …
The server is not authenticated. Continue to access it? (y/n)[n]:y //服务器未认证是否访问
client %%01SSH/4/CONTINUE_KEYEXCHANGE(l)[1]:The server had not been authenticated in the process of exchanging keys. When deciding whether to continue, the user chose Y.
[client] //服务器在交换密钥的过程中没有经过身份验证
Save the server’s public key? (y/n)[n]:y //保存服务器的公钥
The server’s public key will be saved with the name 192.168.1.1. Please wait…

client %%01SSH/4/SAVE_PUBLICKEY(l)[2]:When deciding whether to save the server’s public key 192.168.1.1, the user chose Y. //决定是否保存服务器的公钥192.168.1.1
[client]
Enter password:

  • 9
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

北京Play

如有更多需要请多多关照

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值