Pular para o conteúdo

Arista EOS

This page covers administrative login to Arista EOS with the built-in Arista EOS (device administration) template. For RADIUS concepts — first-factor modes, identification, BlastRADIUS — see RADIUS.

PlatformSoftwareModesWhat was verified
Arista vEOS4.36.0.1Fpassword, MFA only, password + MFATOTP in the SSH keyboard-interactive prompt and on the serial console; privilege from Arista-AVPair; roles enforced with local command authorization; MFA only after an SSH key; exec accounting Start / Stop with Class

Session-Timeout and Idle-Timeout were observed to have no effect on EOS.

First factorOkYouIn checks the password, or MFA only after the user’s SSH key.
Second factorTOTP, e-mail code, push (Web Push, Telegram) — the prompt appears in the same login (SSH keyboard-interactive or the serial-console login).
PromptsYes: EOS shows OkYouIn’s prompt as it is. An empty answer is sent too and counts as a wrong code.
AccountingExec Start / Stop with session time and Class; no Interim-Update, no byte counters, no disconnect cause.
Client IPEOS sends the SSH client’s address as Calling-Station-Id by default. Serial-console logins carry none.
  1. In OkYouIn, open Access ▸ Applications ▸ Add application and pick Arista EOS (device administration). The Connect tab shows the configuration below with your server address and shared secret filled in.

  2. Add the switch’s address under Sources. This application is created without a NAS-Identifier and should stay that way: EOS sends NAS-Identifier only in Access-Request, never in Accounting-Request, so with a NAS-Identifier set every accounting packet would be recorded as unidentified and the Sessions tab would stay empty.

  3. Keep a working local admin account and an open session until the new login is confirmed.

192.0.2.10 is the OkYouIn server in this example. Replace <INTERFACE> with the interface EOS reaches it from (Management1 or an SVI such as Vlan1). EOS keeps its own copy of the ports inside the server group: keep both lines’ ports identical.

radius-server host 192.0.2.10 auth-port 1812 acct-port 1813 timeout 60 retransmit 0 key 0 <SHARED-SECRET>
!
aaa group server radius OKYOUIN
server 192.0.2.10 auth-port 1812 acct-port 1813
!
ip radius source-interface <INTERFACE>
!
aaa authentication login default group OKYOUIN local
aaa authorization exec default group OKYOUIN local
aaa accounting exec default start-stop group OKYOUIN

Method lists on EOS are global: default covers SSH, console the serial console — there are no per-line lists. To send the serial console through OkYouIn as well (password mode only):

aaa authentication login console group OKYOUIN local
aaa authorization exec console group OKYOUIN local
aaa accounting exec console start-stop group OKYOUIN

EOS can roll a change back automatically. Paste the lines inside a configuration session with a commit timer, then confirm from a new login:

configure session okyouin
! paste the lines above
commit timer 00:05:00
! log in with a NEW SSH session as an OkYouIn user, then confirm:
configure session okyouin commit

MFA only: SSH key first, then the OkYouIn code

Section titled “MFA only: SSH key first, then the OkYouIn code”

EOS cannot check its local password and then ask RADIUS for the code, but SSH can require a public key and then keyboard-interactive. Set First factor to MFA only in the application’s Settings and add:

management ssh
authentication protocol multi-factor public-key keyboard-interactive
!
! then for every OkYouIn user (a random secret nobody knows — never nopassword):
username <USER> secret 0 <RANDOM-UNUSED-SECRET>
username <USER> ssh-key <PUBLIC-KEY>

OkYouIn then asks only for the code. The Password: prompt before it is not checked — leave it empty.

Set these in the application’s Rules tab; they act through the aaa authorization exec line of the same list.

AttributeEffect
Arista-AVPair = shell:priv-lvl=NExec privilege level 0–15 (template default shell:priv-lvl=15). Without it the session starts at level 1.
Arista-AVPair = shell:roles=<role>Role of the session, as a second Arista-AVPair.
Arista-User-RoleRole, same as shell:roles= (e.g. network-operator).
Arista-User-Priv-LevelPrivilege level 0–15, instead of shell:priv-lvl.
ClassEchoed in accounting Start and Stop. A Class from a rule replaces OkYouIn’s own Class token.

A role is enforced only with aaa authorization commands all default local. Then an OkYouIn user without a role is denied every command, and a role that does not exist gets no configuration commands. Service-Type, Session-Timeout and Idle-Timeout have no effect on EOS.

EOS does not try the next method after a TACACS+ reject, and aaa authorization commands … group <tacacs> denies every command of a user TACACS+ does not know. OkYouIn and TACACS+ therefore cannot both serve SSH users: keep command authorization none or local for OkYouIn users. Note that the default accounting list replaces the exec accounting of every SSH user, TACACS+ included.

aaa accounting exec default start-stop group OKYOUIN (and exec console for the serial console) sends Accounting Start at login and Stop at logout with the session time: user, Acct-Session-Id, Calling-Station-Id (SSH), NAS-Port-Id and Class. OkYouIn’s Class token links each session to its sign-in on the Sessions tab.

EOS has no interim accounting and ignores Acct-Interim-Interval: keep Interim interval (seconds) empty. An unanswered Accounting-Request does not delay the login.

EOS 4.36.0.1F sends Message-Authenticator in every Access-Request, so Strict is safe and recommended for this application: every Access-Request without it is then dropped. New applications start at Standard.

  1. Open a new SSH session as an OkYouIn user and complete the code prompt.

  2. Check Logging ▸ RADIUS log for the Accept, and the application’s Sessions tab after logout.

  3. show users detail on the switch shows the role a session got.

  4. Confirm the configuration session (configure session okyouin commit) before the timer expires.

SymptomLikely cause
Login waits a minute, then uses localOkYouIn did not answer — see Logging ▸ RADIUS log ▸ Dropped packets (wrong secret, unknown client).
Sessions tab stays emptyA NAS-Identifier was set on the application; clear it.
configure terminal deniedLocal command authorization is on and the user has no role, or a role that does not exist.
Session at level 1No shell:priv-lvl / Arista-User-Priv-Level in the matching rule.