7.6-SSH远程控制
Security shell 安全的远程控制协议
四层使用 TCP 22端口号
特点:传输的数据是加密的,远程Linux 服务器也常用

配置命令
R1:
[R1]aaa
[R1-aaa]local-user orcy privilege level 3 password cipher 123
[R1-aaa]local-user orcy service-type ssh
[R1-aaa]qu
[R1]user-interface vty 0 4
[R1-ui-vty0-4]protocol inbound ssh
[R1-ui-vty0-4]authentication-mode aaa
[R1-ui-vty0-4]qu
[R1]stelnet server enable
R2:
此时在R2通过SSH远程登录R1,输入正确的用户名密码后即可成功登录。
[R2]ssh client first-time enable
[R2]stelnet 12.1.1.1
Please input the username:orcy
Trying 12.1.1.1 ...
Press CTRL+K to abort
Connected to 12.1.1.1 ...
The server is not authenticated. Continue to access it? (y/n)[n]:y
Save the server's public key? (y/n)[n]:y
The server's public key will be saved with the name 12.1.1.1. Please wait...
Enter password:
<R1>
部分设备需要手动生成密钥
[huawei]rsa local-key-pair create
[huawei]ssh user orcy authentication-type all
[huawei]ssh user orcy service-type all
*其中用户名为orcy