建立 aaa 验证用户
1 2 3 4 5 6 7 8
| [Switch] aaa
[Switch-aaa] local-user <user> password cipher <password>
[Switch-aaa] local-user admin privilege level 15
[Switch-aaa] local-user admin service-type ssh terminal http
|
设置用户界面视图
1 2 3 4 5 6 7
| [Switch] user-interface vty 0 4
[Switch-ui-vty0-4] authentication-mode aaa
[Switch-ui-vty0-4] protocol inbound all
[Switch-ui-vty0-4] user privilege level 15
|
配置服务器端 RSA 秘钥对
1 2
| [Switch] rsa local-key-pair create
|
新建 SSH 用户
注意:新建 SSH 用户,必须和 aaa 验证用户同名
1 2 3 4 5 6
| [Switch] ssh user admin authentication-type password
[Switch] ssh user admin service-type all
[Switch] display ssh user-information
|
开启 stelnet 服务
1
| [Switch] stelnet server enable
|
设置 sftp 根目录
1
| [Switch] ssh user admin sftp-directory flash:/
|
开启 sftp 功能
1
| [Switch] sftp server enable
|
查看服务状态
1
| [Switch] display ssh server status
|
保存修改文件
记得一定要保存修改的操作
1 2 3 4
| # 退出系统视图 [Switch] quit # 保存配置 <Switch> save
|
SFTP 连接结果
参考 & 引用
https://blog.csdn.net/qq_29855509/article/details/108965506
https://blog.csdn.net/gsls200808/article/details/107430839
https://blog.csdn.net/richardfjf/article/details/106647438