[local]ASR5000-2# copy /flash/test sftp://root:cisco123@10.201.251.13:22/localdisk/test Failure: "FAILED because unable to write destination",[an error occurred while processing this directive]
copy /flash/test sftp://root:cisco123@10.201.251.13:22/localdisk/test
De instelling in /etc/ssh/sshd_fig bestand:
# Change to yes to enable tunnelled clear text passwords PasswordAuthentication no[an error occurred while processing this directive]
Als u FTP-protocol gebruikt, is de overdracht geslaagd.
Oplossing
Van de twee Linux-servers in het lab was het mogelijk om de kwestie op de ene server te reproduceren, maar niet op de andere. Slechts verschil was het IP adres van de server in de test.
[local]ASR5000-2# copy /flash/test sftp://root:cisco123@10.201.251.5:22/localdisk/test ******************************************************************************** Transferred 22789 bytes in 0.002 seconds (11127.4 KB/sec) [local]ASR5000-2# [local]ASR5000-2# [local]ASR5000-2# copy /flash/test sftp://root:cisco123@10.201.251.13:22/localdisk/test Failure: "FAILED because unable to write destination",[an error occurred while processing this directive]
copy /flash/test sftp://root:cisco123@10.201.251.13:22/localdisk/test [local]ASR5000-2#
Terwijl de serverinstellingen worden herzien, werd opgemerkt dat er een verschil was tussen de instelling van twee servers in etc/ssh/sshd_disklokbestand. De werkserver had deze instelling:
# Change to yes to enable tunnelled clear text passwords PasswordAuthentication yes[an error occurred while processing this directive]
Wanneer deze parameter is gewijzigd in ja en de service opnieuw wordt gestart met de opdracht /etc/init.d/ssh start, kunt u een bestand met SFTP met succes overdragen.
[local]ASR5000-1# copy /flash/test2.cfg sftp://root:cisco123@10.201.251.13/localdisk/test2.cfg Tuesday January 19 08:11:47 PST 2016 Are you sure? [Yes|No]: yes Tuesday January 19 08:12:15 PST 2016 ******************************************************************************** Transferred 33316 bytes in 0.001 seconds (32535.2 KB/sec) [local]ASR5000-1# copy /flash/test2.cfg sftp://root:cisco123@10.201.251.5/localdisk/test2.cfg Tuesday January 19 08:13:09 PST 2016 Are you sure? [Yes|No]: yes Tuesday January 19 08:13:18 PST 2016 ******************************************************************************** Transferred 33316 bytes in 0.001 seconds (32535.2 KB/sec)[an error occurred while processing this directive]