怎样SSH登陆路由

怎样SSH登陆路由,第1张

1、下载安卓系统的SSH客户端软件,百度搜索会有很多优秀的SSH客户端,我们选择常用的ConnectBot即可。

2、打开ConnectBot,如图,画面很简洁,左下角可以选择SSH或者telnet。我们选择SSH。

3、输入root@路由器的IP:22,root是登录的账户。路由器的IP一般没有改变的话是:192.168.31.1。图中的IP是因为我的路由器是中继模式获得的IP。点击回车开始连接。

4、连接过程中会有一次对话确认,点击确认就可以。

5、稍等片刻就会让你输入密码。这时说明你已经和路由器连接上了。输入密码。这个密码就是当时路由器SSH时从官网得到的SSH密码。

6、点击回车就可以登陆了。看见“welcome to xiaoqiang”就代表连接成功了。

Cisco设备上使用ssh替代telnet实验

第一步:建立本地的身份验证数据库

R3(config)#aaa

new-model

R3(config)#aaa

authentication

login

ssh

local

选择身份验证由本地验证,起个名字叫ssh

R3(config)#username

aa

secret

aa1

建立本地用户名aa密码aa1的账户

第二步:设置telnet登陆验证采用aaa

的本地local验证

R3(config)#line

vty

0

4

R3(config-line)#login

authentication

ssh

R3(config-line)#transport

input

ssh

设置vty只接收ssh登陆。

第三步:配置ssh加密密钥

R3(config)#ip

domain-name

cisco.com

设置一个路由器的域名

R3(config)#crypto

key

generate

rsa(使用rsa散列算法)

The

name

for

the

keys

will

be:

R3.cisco.com

Choose

the

size

of

the

key

modulus

in

the

range

of

360

to

2048

for

your

General

Purpose

Keys.

Choosing

a

key

modulus

greater

than

512

may

take

a

few

minutes.

How

many

bits

in

the

modulus

[512]:(默认密钥长度为512位)

%

Generating

512

bit

RSA

keys,

keys

will

be

non-exportable...[OK]

R3(config)#

Mar

25

01:20:22.359:

%SSH-5-ENABLED:

SSH

1.99

has

been

enabled

生成一个ssh的密钥

测试,从R1登陆R3,使用用户名aa,密码aa1登陆

R1#ssh

-l

aa

20.0.0.2

Password:

R3>en

Password:

R3#

摘自

http://www.cuisir.org/ciscolab/05.html


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/tougao/11278730.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-14
下一篇2023-05-14

发表评论

登录后才能评论

评论列表(0条)

    保存