Ok, I understand.
So I have changed : wired pin to pn as below:
NanoA -- NanoB
D11 -- D11
D12 -- D12
D13 -- D13
5V -- 5V
GND -- GND
D10 -- pin 5 of ICSP connector
Then I connect NanoA (working one) to the computer, choose the options "Arduino Nano" and "Atmega 328" on the IDE, and "AVRISP mkll" as programmer.
I then upload the borad programmer on NanoA and I get on the console :
Atmega chip programmer.
Written by Nick Gammon.
Version 1.37
Compiled on Nov 12 2017 at 20:07:14 with Arduino IDE 10802.
Attempting to enter ICSP programming mode ...
Entered programming mode OK.
Signature = 0x1E 0x94 0x0B
Processor = ATmega168PA
Flash memory size = 16384 bytes.
LFuse = 0xC6
HFuse = 0xDD
EFuse = 0xFC
Lock byte = 0xEF
Clock calibration = 0x91
Bootloader address = 0x3E00
Bootloader length = 512 bytes.
Type 'Q' to quit, 'V' to verify, or 'G' to program the chip with the bootloader ...
Then I type V and I get:
Verifying ...
Verification error at address 3FF4. Got: 0x00 Expected: 0xFF
Verification error at address 3FF5. Got: 0x00 Expected: 0xFF
Verification error at address 3FF6. Got: 0x00 Expected: 0xFF
Verification error at address 3FF7. Got: 0x00 Expected: 0xFF
Verification error at address 3FF8. Got: 0x00 Expected: 0xFF
Verification error at address 3FF9. Got: 0x00 Expected: 0xFF
Verification error at address 3FFA. Got: 0x00 Expected: 0xFF
Verification error at address 3FFB. Got: 0x00 Expected: 0xFF
Verification error at address 3FFC. Got: 0x00 Expected: 0xFF
Verification error at address 3FFD. Got: 0x00 Expected: 0xFF
10 verification error(s).
Programming mode off.
Type 'C' when ready to continue with another chip ...
So there seems to be a problem. When I try to uplad the Blink sketch on NanoB, I get the same error messages, such as:
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x0a