Secure file transfer with SCP

Unanswered Question
May 30th, 2008

I know this is not a putty forum, but I thought that some of you may be using this. I am trying to use Putty pscp to transfer files to and from my routers. I can pull files from the router with no problem. When I try to push a file to the router, it will accept my credentials and I can look in the flash on the router and it shows the file as there, but after a minute the scp connection says "Fatal: Server unexpectedly closed network connection" and when I look in the flash on the router the file is gone. I have looked at the traffic on the ACL's and do not see anything hitting a deny statement. Any ideas why this is failing?

Here is a debug ip scp log when trying to push a file:

*May 30 16:00:20.968: SCP: [22 -> 10.3.3.242:1353] send <OK>

*May 30 16:00:21.000: SCP: [22 <- 10.3.3.242:1353] recv C0644 7284 ch203.cfg

*May 30 16:00:21.004: SCP: [22 -> 10.3.3.242:1353] send <OK>

*May 30 16:00:21.388: SCP: [22 <- 10.3.3.242:1353] recv 7284 bytes

*May 30 16:00:21.388: SCP: [22 <- 10.3.3.242:1353] recv <OK>

*May 30 16:00:21.388: SCP: [22 -> 10.3.3.242:1353] send <OK>

I appreciate any help. Thanks!

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 1 (1 ratings)
smahbub Thu, 06/05/2008 - 07:19

The Secure Copy (SCP) feature provides a secure and authenticated method for copying router configuration or router image files. SCP relies on Secure Shell (SSH), an application and a protocol that provide a secure replacement for the Berkeley r-tools.Check the configuration of SCP using the guide in the URL.

Rfer the following url for more information on scp config and usage with SSH:

http://www.cisco.com/en/US/docs/ios/12_2t/12_2t2/feature/guide/ftscp.html

holt0202 Thu, 06/05/2008 - 12:34

I went by this document to set it up, and it is working for pulling files from the router, but when I try to push a file to the router it acts like it is working then just fails. As mentioned earlier there are no traces of failure in the debug logs....still no solution

michael.leblanc Wed, 09/23/2009 - 08:48

Experiencing the same issue (able to read from IOS file systems, but unable to write to these same file systems) with Putty's PSCP.

Copying From the IOS device (Works)

....................................

> pscp username@ios-device:startup-config .

> pscp username@ios-device:nvram:startup-config .

> pscp username@ios-device:flash:crashinfo_20081104-163509 .

Note: The period "." at the end of each cmd line specifies the current local directory on the PC as the target.

Copying To the IOS device (Does not work)

........................................

> pscp c:\x-Backup.txt username@ios-device:x-backup.txt

> pscp c:\x-Backup.txt username@ios-device:nvram:x-backup.txt

> pscp c:\x-Backup.txt username@ios-device:flash:x-backup.txt

Note: Each results in the following error message conveyed by PSCP:

"Fatal: Server unexpectedly closed network connection"

Note: The file I attempted to write has a status of "[deleted]".

ios-device#sh flash

System flash directory:

File Length Name/status

1 12908840 image-file-name.bin

2 242285 attack-drop.sdf

3 308489 crashinfo_20081104-163509

4 1059 x-backup.txt [deleted]

[13460936 bytes used, 3054132 available, 16515068 total]

16384K bytes of processor board System flash (Read/Write)

Anyone successfully writing to IOS file systems with PSCP?

Actions

Login or Register to take actions

This Discussion

Posted May 30, 2008 at 6:59 AM
Stats:
Replies:3 Avg. Rating:1
Views:2385 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard