怎样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”就代表连接成功了。

Telnet协议是TCP/IP协议族中的一员,是Internet远程登录服务的标准协议和主要方式。它为用户提供了在本地计算机上完成远程主机工作的能力。在终端使用者的电脑上使用telnet程序,用它连接到服务器。终端使用者可以在telnet程序中输入命令,这些命令会在服务器上运行,就像直接在服务器的控制台上输入一样。可以在本地就能控制服务器。

SSH 为 Secure Shell 的缩写,由 IETF 的网络小组(Network Working Group)所制定;SSH 为建立在应用层基础上的安全协议。SSH 是目前较可靠,专为远程登录会话和其他网络服务提供安全性的协议。利用 SSH 协议可以有效防止远程管理过程中的信息泄露问题。SSH最初是UNIX系统上的一个程序,后来又迅速扩展到其他 *** 作平台。SSH在正确使用时可弥补网络中的漏洞。SSH客户端适用于多种平台。几乎所有UNIX平台—包括HP-UX、Linux、AIX、Solaris、Digital UNIX、Irix,以及其他平台,都可运行SSH。

思科telnet/ssh登录配置案例:

要求:

R2可以telnet R1

R3可以ssh R2

配置AR1

R1(config)#enable password 123

R1(config)#line vty 0 4

R1(config-line)#password 123

R1(config-line)#login

R1(config-line)#transport input telnet

R1(config)#interface ethernet 0/0

R1(config-if)#ip address 192.168.12.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#exit

配置AR2

Router(config)#interface ethernet 0/1

Router(config-if)# ip address 192.168.12.2 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface ethernet 0/0

Router(config-if)#ip address 192.168.13.2 255.255.255.0

Router(config-if)#no shutdown

Router#telnet 192.168.12.1 //telnet R1

Trying 192.168.12.1 ... Open

User Access Verification

Password:

R1>enable

Password:

R1#exit

[Connection to 192.168.12.1 closed by foreign host]

又回到R2

Router(config)#hostname R2

R2(config)#ip domain name www.163.com

R2(config)#crypto key generate rsa modulus 1024

The name for the keys will be: R2.www.163.com

% The key modulus size is 1024 bits

% Generating 1024 bit RSA keys, keys will be non-exportable...

[OK] (elapsed time was 0 seconds)

R2(config)#username glab1 secret glab1

R2(config)#line vty 0 4

R2(config-line)#login local

R2(config-line)#transport input ssh

R2(config)#enable password 123

R2(config)#

R2(config)#do show ip interface brief

Interface IP-Address OK? Method Status Protocol

Ethernet0/0 192.168.13.2 YES manual up up

Ethernet0/1 192.168.12.2 YES manual up up

Ethernet0/2 unassigned YES unset administratively down down

Ethernet0/3 unassigned YES unset administratively down down

R2(config)#

配置AR 3

Router(config)#hostname R3

R3(config)#interface ethernet 0/1

R3(config-if)#ip address 192.168.13.2 255.255.255.0

R3(config-if)#no shutdown

ssh R2开始

R3#ssh -l glab1 192.168.13.2

Password:

Password:

R2>


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

原文地址: http://www.outofmemory.cn/bake/11873940.html

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

发表评论

登录后才能评论

评论列表(0条)

保存