Using nc-read-xr-shellutil-cfg-20-ydk.py to read the hostname on a IOS-XRv on VIRL. However, it said the server reject... Modified the code is changing "import urlparse" to "import urllib.parse" because of using python3.
In XR cli, enabled the yang, don't know why the default port is not 830 but port 22.
<Config & Logs removed>
Finally upgraded the XRv to 6.1.2 from 6.0.1, it fixes the problem. But still the port is 22 instead of 830.
You can just invoke with default port (830) like this:
"$ ./nc-read-xr-shellutil-cfg-20-ydk.py ssh://admin:admin@172.16.1.101 -v"
You can specify explicitly a port. Both 830 and 22 should work.
Make sure that you router has this configuration:
netconf-yang agent
ssh ! ssh server v2 ssh server netconf vrf default !
No other XML or NETCONF configuration should be present. Also, you need to have generated your public key from Exec:
RP/0/RP0/CPU0:Router# crypto key generate rsa
Thu Dec 8 08:31:06.992 UTC The name for the keys will be: the_default Choose the size of the key modulus in the range of 512 to 4096 for your
General Purpose Keypair. Choosing a key modulus greater than 512 may take a few minutes. How many bits in the modulus [2048]: 4096 Generating RSA keys ... Done w/ crypto generate keypair [OK] RP/0/RP0/CPU0:Router# RP/0/RP0/CPU0:Router#sh crypto key mypubkey rsa Thu Dec 8 08:31:31.213 UTC Key label: the_default Type : RSA General purpose Size : 4096 Created : 08:31:17 UTC Thu Dec 08 2016 Data : 30820222 300D0609 2A864886 F70D0101 01050003 82020F00 3082020A 02820201 008A063B 6923DB5A 8D34C93C 3D27EDE0 2B5EF5CE 79FEB8FE 56BBCABF F14F896C A0D6ED30 FE2F5E94 C7BA4D20 446FD89C 3838DECD 5503A71B C752CCF4 9D82BA4D 5F2B2EA6 8EBD2397 F3BD91C3 A855C4E2 6219C783 52E2FA01 D6BDEEF7 B16BDCBE 71D2FE4B A27B6987 27E12173 151CC8E1 80B04EA0 1B0225DC 1A70E2C3 25E20505 C191CB10 E0FAD17C 4E17A918 733BEE9A 70BEE404 EC06B7AF 1EDCC731 2F369135 03416F9C 795C64DC EEA0A0AB 72C08B42 C0B4B621 A3A8CE87 3AF23B63 AEA86ED0 FB562E9A 0C4733ED 0758EDE8 1B1D481F 925A6452 1705FFC7 2DD4F493 A37D274D 337AC5CE D81F5584 BF7B9402 EC236456 79309F17 B4466407 39406605 3E0BE9CC 50F54820 A5E1EABC 3E1508EB 1BF4879F 1F48CE30 EF1CFA6E 45C738B6 7E836E13 35CCFB59 ACECB39F 946D843C 7495A975 D121AB5D 4E49C681 B9B8FF32 92DEC3A7 B26A23D7 F440CA1C 03A2F854 82EF3C06 C1CF74E4 0D812EA2 A51A911A EF2C7D7C 2C6A4CF5 6FD1E003 9E4E7EFD ED90C5D1 736E6D7F 3EA60644 20B168B2 05F9A688 91E8E3FE D3634BCC F29CB03D E11FE730 CD4AEB9D 43F18529 592A18C2 8A2098CB EB47E1F4 C5935CF7 4129ABDF DE10949F C80CFA99 26543F96 0AD657B9 DC4D81E3 4B852B7F 13B44CDA 7FD466F9 14CD2131 F9148F75 9AB5377A 380B19BE 3DFF1C31 CF3F924C 27ED0955 EA9F55E9 386B5D29 10ADEDA1 2FCA3A1C 41385E7F 3A1176C9 55020301 0001 RP/0/RP0/CPU0:Router#
Comments
0 comments
Please sign in to leave a comment.