客户机要能够远程登录,FTP访问路由器,WEB页面登录交换机(默认模拟器只支持交换机登录web页)
三、配置步骤
配置IP地
interface GigabitEthernet0/0 (进入接口)
ip address 192.168.56.2 255.255.255.0 (配置接口地址)
改名
sysname r1
开启服务
telnet server enable (开启telnet协议)
ssh server enable (开启ssh协议)
ftp server enable (开启ftp协议)
创建用户
local-user wxr class manage 创建用户
password simple 123 密码123
service-type ftp (开启ftp服务)
service-type ssh telnet (开启telnet、ssh服务)
authorization-attribute user-role network-admin (配置用户权限为管理员)
line vty 0 63 (设置登陆的用户数量)
authentication-mode scheme (设置登录类型为既要用户名也需要密码)
*none不需要密码**password需要密码**scheme既要用户名也需要密码*
user-role network-admin (登录为管理员权限)
protocol inbound ?(登录的权限 all为ssh和telnet两种)
all All protocols
ssh SSH protocol
telnet Telnet protocol
protocol inbound all
[r1]public-key local create rsa //本地创建密钥
The local key pair already exists.
Confirm to replace it? [Y/N]:y
The range of public key modulus is (512 ~ 2048).
Input the modulus length [default = 1024]:y
Created the key pair successfully.
测试:ftp 192.168.56.2 效果略
telnet 192.168.56.2 效果略
创建密钥一些选项(不用做,看一看)
The local key pair already exists.(已有秘钥是否替换)
Confirm to replace it? [Y/N]:y(确认替换)
The range of public key modulus is (512 ~ 2048).(设置秘钥大小为512至2048字节)
If the key modulus is greater than 512, it will take a few minutes.
Press CTRL+C to abort.
Input the modulus length [default = 1024]:512(设置512最小字节)
Generating Keys...
Create the key pair successfully.
The local key pair already exists.(已有秘钥是否替换)
Confirm to replace it? [Y/N]:y(确认替换)
The range of public key modulus is (512 ~ 2048).(设置秘钥大小为512至2048字节)
If the key modulus is greater than 512, it will take a few minutes.
Press CTRL+C to abort.
Input the modulus length [default = 1024]:512(设置512最小字节)
Generating Keys...
Create the key pair successfully.
交换机的web页面登录
<H3C>sys(进入配置界面)
[H3C]sysn sw1
[sw1]ip http en (开启http服务)
[sw1]ip https en (开启https服务)
[sw1]local-user wxr class manage (创建用户wxr)
[sw1-luser-manage-wxr]password simple 111111111q (设置用户密码)
[sw1-luser-manage-wxr]service-type http https (设置服务类型为http和https)
[sw1-luser-manage-wxr]authorization-attribute user-role network-admin (用户级别为管理员)
[sw1-luser-manage-wxr]qui
[sw1]int g1/0/1
[sw1-GigabitEthernet1/0/1]port link-mode route (将交换机接口改为三层接口)
[sw1-GigabitEthernet1/0/1]ip add 192.168.56.3 24 (配置ip地址)
注:现在路由器的版本比较高,大家如果想要登录成功需要以下步骤