Posted on November 5, 2015 9:33 pm
 |  Asked by Kanishk Thareja
 |  12064 views
RESOLVED
0
0
Print Friendly, PDF & Email

Hey,

I have an EOS setup on virtual box and I’m trying to scp a file from my local machine into EOS. Everytime I try to do I get the following error :-

“The ‘scp’ command is only available in privileged mode.”

The privilege on my EOS is set to 15 but Im unable to set any password on it. Also I tried “aaa authorization exec default local” but it gives me invalid input.

How should I fix this ?

Marked as spam
0
Posted by Jeremy Georges
Answered on November 5, 2015 10:03 pm

Kanishk,

Yes, you need to have ’aaa authorization exec default local’ configured for local authorization for exec mode to work.

Without:

$ scp README.TXT jeremy@192.168.56.201:/tmp/
Password:
% The ’scp’ command is only available in privileged mode.

 

With:

$ scp README.TXT jeremy@192.168.56.201:/tmp/
Password:
README.TXT

 

 

Please make sure authorization for EXEC is set properly:

vEOS(config)#show aaa method-lists authorization
Authorization method lists for COMMANDS:
name=privilege0-15 methods=none
Authorization method list for EXEC:
name=exec methods=local

 

-Jeremy

Yes I understand that and I get the following response from the above command :-
Authorization method lists for COMMANDS:
name=privilege0-15 methods=none
Authorization method list for EXEC:
name=exec methods=none

but I’m unable to run the command ’aaa authorization exec default local’. Its giving me invalid input error. How should I fix this ?

(Kanishk Thareja at November 6, 2015 3:35 am)
0
Posted by Shine
Answered on November 5, 2015 10:37 pm

Kanishk,

This should work just fine, please see my outputs below:

1) from host to vEOS

eshine:~ eshine$ scp test.txt arista@172.16.219.122:
Password:
test.txt 100% 47 0.1KB/s 00:00

2) from vEOS to host

Tor2#bash

Arista Networks EOS shell

[arista@Tor2 ~]$ scp test2.txt eshine@172.16.219.1:
Warning: Permanently added ’172.16.219.1’ (RSA) to the list of known hosts.
Password:
test2.txt 100% 23 0.0KB/s 00:00

3) Config (just omitted ethernet part, nothing special):

Tor2#sh run
! Command: show running-config
! device: Tor2 (vEOS, EOS-4.14.0F)
!
! boot system flash:/vEOS.swi
!
transceiver qsfp default-mode 4x10G
!
hostname Tor2
!
spanning-tree mode mstp
!
aaa authorization exec default local
!
no aaa root
!
username arista privilege 15 secret 5 $1$wQtfkIjB$9OVp0vBRE8D1gKc5f18j70
!

=====

Would you please post specifics about your tests? Step-by-step host and vEOS commands and vEOS config?

HTH

Yes Im trying the following on my machine :-

$ scp -P 2224 /Desktop/EosSdk-1.7.0-4.15.2F.i686.rpm admin@localhost:
% The ’scp’ command is only available in privileged mode.

And on EOS :-

sw4#aaa authorization exec default local
% Invalid input

Does that make it clearer ?

(Kanishk Thareja at November 6, 2015 3:58 am)
0
Posted by Vikram
Answered on November 6, 2015 4:07 am

Hi Kanishk,

Could you please post a screenshot or just copy/paste the output when you get the error message? Please include the output that shows you entering the command on the switch with the Cli prompts. In addition could you also attach a file which shows the entire configuration? Thanks

Marked as spam
1
Posted by Vikram
Answered on November 6, 2015 4:17 am

Hi Kanishk,

You need to be in configuration mode to enter the command ”aaa authorization exec default local”. Please do as follows

Switch# config t
Switch(config)# aaa authorization exec default local
Switch(config)# end
Switch#

Once you have done the above please try and ssh to the switch and after you enter the user-id/password please confirm what is the prompt you get.

You should directly be @ the prompt which shows ”Switch#”.

If you see ”Switch>” that means you do not have privilege-level 15 configured for the username.

Hence please go back to configuration mode via ”config t” and enter ”username <user> privilege 15 nopassword”.

Alternatively, if you want to configure a password then please use ”username <user> privilege 15 secret <password>” instead.

HTH

Marked as spam
0
Posted by Jeremy Georges
Answered on November 6, 2015 4:25 am

Kanishk,

It looks (based on the prompt sw4#) that you’re trying to enter that in operational mode, not in config mode. Can you verify that you’re doing a ’config t’ before you enter the ’aaa authorization exec default local.’

 

vEOS>en
Password:
vEOS#conf t
vEOS(config)#aaa authorization exec default local
vEOS(config)#

 

As Vikram stated, if you can send over more details that would be helpful; we’re trying to ascertain the issue with just the brief snippets. A little more details and we can give you more thorough assistance.

Thanks,

-Jeremy

Marked as spam

Post your Answer

You must be logged in to post an answer.