华为交换机 ssh和Telnet远程登录配置命令
联系方式 QQ481715271***
**
- 简单拓扑
**
LSW4 vlan 20配置地址的原因是SSH Telnet 都可以登录
LSW3 配置
vlan batch 10 20
interface Vlanif10
ip address 192.168.10.1 255.255.255.0
interface Vlanif20
ip address 192.168.20.1 255.255.255.0
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
q
##配置rsa密钥
rsa local-key-pair creat
512
q
## 进入用户视图
user-interface vty 0 4
authentication-mode aaa
protocol inbound all
##配置AAA认证
aaa
local-user admin password simple 123456
local-user admin privilege level 15
local-user admin service-type telnet ssh
q
##开启stelnet服务
stelnet server enable
ssh user admin
ssh user admin authentication-type password
ssh user admin service-type stelnet
LSW3配置完毕
LSW4配置
vlan batch 10 20
interface Vlanif20
ip address 192.168.20.2 255.255.255.0
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
ip route-static 0.0.0.0 0.0.0.0 192.168.20.1##这里要配置一条指向性静态路由,否则Telnet找不到管理地址;
##配置rsa密钥
rsa local-key-pair creat
512
q
## 进入用户视图
user-interface vty 0 4
authentication-mode aaa
protocol inbound all
##配置AAA认证
aaa
local-user admin password simple 123456###这里密码可以改
local-user admin privilege level 15
local-user admin service-type telnet ssh
q
##开启stelnet服务
stelnet server enable
ssh user admin
ssh user admin authentication-type password
ssh user admin service-type stelnet
访问
telnet 192.168.20.1
stelnet 192.168.20.1
#这里ssh首次登陆的时候需要配置 ssh clinet first-time enable
如果用CTR等一些远程软件 则不要输入这条命令
进来请点个赞吧!!!