SecureCRT登录进去后,进入 system view

1.关闭Telnet 
undo telnet server enable 

2.开启SSH

stelnet server enable

ssh user admin

ssh user admin authentication-type password

ssh user admin service-type all

3.配置aaa认证用户名和密码

aaa

 local-user admin password irreversible-cipher xxx

 local-user admin privilege level 3

 local-user admin service-type ssh

4.配置远程aaa认证

user-interface maximum-vty 15

user-interface vty 0 14

 authentication-mode aaa

user-interface vty 16 20  

5.查看ssh用户信息

dis ssh user-information 

其他参考:

1、创建本地RSA秘钥对
rsa local-key-pair create       //产生RSA本地秘钥
The key name will be:  
The range of public key size is (512 ~ 2048). 
NOTES: If the key modulus is greater than 512, 
it will take a few minutes. 
Input the bits in the modulus[default = 2048]: 
Generating keys… 
……………….+++++ 
……………………++ 
….++++ 
………..++

2、配置vty界面支持的登录协议(设置vty 0 4远程登陆的虚拟端口)

VTY是路由器的远程登陆的虚拟端口,0 4表示可以同时打开5个会话,

line vty 0 4是进入VTY端口,对VTY端口进行配置,比如说配置密码,或者ACL.

user-interface vty 0 4  //进入vty 0 4远程虚拟端口
authentication-mode aaa     //验证方式为aaa
Warning: The level of the user-interface(s) will be the default level of AAA users, please check whether it is correct.

protocol inbound all  {ssh | all}      //这里选择ssh或者ALL都可以,ssh代表的是只支持ssh登录,all代表也支持其他的登录方式

//必须配置VTY用户界面的验证方式为AAA,不然protocol inbound ssh配置不成功

3.配置ssh用户名和密码
ssh user admin     // 创建SSH用户admin
Info: Succeeded in adding a new SSH user. 
ssh user admin authentication-type password //为admin用户设置ssh认证为password,此命令对设置单一用户设置来说比较实用
aaa

local-user admin password   //不想修改原来的telnet密码的话,可以不用设置,该步骤可以省略 
Please configure the login password (8-128) 
It is recommended that the password consist of at least 2 types of characters, including lowercase letters, uppercase letters, numerals and special characters. 
Please enter password: 
Please confirm password: 
Please enter old password: 
Error: The new password is the same as the old password.

local-user admin service-type ssh 
Info: After changing the rights (including the password, access type, FTP directory, and level) of a local user, the rights of users already online do not change. The change takes effect to users who go online after the change.

ssh user admin service-type stelnet  //为admin用户设置ssh认证服务类型为stelnet

stelnet server enable 
Info: Succeeded in starting the Stelnet server. 
save

以ssh2方式登录验证 :

display ssh server status