Dell Networking SONiC:基于 Secure Shell 的登录
Summary: 本文介绍 Dell Networking SONiC 中基于 Secure Shell (SSH) 的登录。本文使用的是运行 Dell SONiC 4.1 的交换机。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
默认情况下,SONiC 使用动态主机配置协议 (DHCP) 从 DHCP 服务器获取管理接口 (Management0) 的 IP 地址(请参阅使用 DHCP 服务器)。要设置远程 SSH 登录以配置交换机:
所有 SONiC 设备都支持基于串行控制台和基于 SSH 的登录。如果您使用 SSH 登录,请登录到管理接口 (Management0) IP 地址。
所有 SONiC 设备都支持基于串行控制台和基于 SSH 的登录。如果您使用 SSH 登录,请登录到管理接口 (Management0) IP 地址。
- 使用默认用户名 admin 和密码 YourPaSsWoRd 从控制台或通过 SSH 连接登录到 Linux shell。
在控制台中:
Debian GNU/Linux 9 sonic ttyS1 sonic login: admin Password: YourPaSsWoRd
通过连接到管理接口的 IP 地址,可以使用从任何远程服务器到 SONiC 的 SSH。
user@debug:~$ ssh admin@sonic_ip_address(or SONIC DNS Name) admin@sonic's password:
- 首次登录时,系统会提示您更改密码。按照步骤更改密码并登录 Linux shell。如果这不是您首次登录,请转至步骤 3。
You are required to change your password immediately (root enforced) Changing password for admin. (current) UNIX password: YourPaSsWoRd Enter new UNIX password: ********* Retype new UNIX password: ******** Linux sonic 4.9.0-11-2-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64 You are on SONIC -- Software for Open Networking in the Cloud – Unauthorized access and/or use are prohibited. All access and/or use are subject to monitoring. Help: http:// azure.github.io/SONiC/ admin@sonic:~$
SSH 登录
默认情况下,SONiC 使用 DHCP 从 DHCP 服务器获取管理接口 (Management0) 的 IP 地址(请参阅使用 DHCP 服务器)。要设置远程 SSH 登录以配置交换机,请执行以下作:
- 登录到交换机。如果您在登录后尚未更改密码,则默认凭据为用户名 admin和密码 YourPaSsWoRd。
- 禁用 DHCP 客户端,并在管理接口上配置 IP 地址。配置用于远程访问的管理路由。
sonic# config terminal sonic(config)# interface Management 0 sonic(conf-if-Management0)# ip address 10.1.1.10/24 gwaddr 10.1.1.1 sonic(conf-if-Management0)# no shutdown sonic(conf-if-Management0)# exit sonic(config)# exit sonic# write memory
- 在 SSH 会话中登录到管理接口 (Management0) IP 地址。管理接口必须已启动并具有 IP 地址。
在控制台中:
Debian GNU/Linux 9 sonic ttyS1 sonic login: admin Password: YourPaSsWoRd
通过连接到 SONiC IP,可以从任何远程服务器通过 SSH 连接到 SONiC。
user@debug:~$ ssh admin@sonic_ip_address(or SONIC DNS Name) admin@sonic's password:
- 当您使用管理员角色登录时,您将位于 Linux shell 中。提示是:
admin@sonic:~$.要访问 Management Framework CLI,请输入 SONiC CLI 命令。
- 当您使用操作员角色登录时,您将被置于管理框架 CLI 中。提示是:
sonic#操作员用户无法访问 Linux shell。
Affected Products
Enterprise SONiC Distribution, PowerSwitch S5148F-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch S5448F-ON, PowerSwitch Z9264F-ONArticle Properties
Article Number: 000218783
Article Type: How To
Last Modified: 08 Nov 2025
Version: 3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.