So some of the readers of this blog might already know this little trick, and what's more some of you might be surprised I didn't know about this until recently! Again props to Alastair my coworker, he has given me some great tips so far!
We are going to use a putty program to copy a file to our flash (could be an IOS or whatever you like really) without having to use FTP, simply over SSH, this is super useful for those times when:
1. You don't have an FTP server handy
2. Your behind NAT so you can't just start an FTP server
3. Your behind a restrictive firewall
How do? Easy,
First, go to putty and download this:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Go to "PSCP.exe" and download it.
My recommendation is to put it in c:\windows\system32\ or somewhere else in your path, by doing this you can use when your in the command line at any path (it is a command line app)
Ok, next we need to add this simple command to your router:
PeterCCIE18371(config)#ip scp server enable
THE above command is the KEY command guys
Also, you will need to have aaa new-model enabled (you don't already? why not?) and make sure your AAA authorization network is OK, so for example:
aaa authorization network
You will also need to have SSH enabled, so make sure you have something like this under your VTY Lines:
line vty 0 15
exec-timeout 800 0
transport input telnet ssh
!
and make sure you have a crypto key generated
crypto key generate RSA modulus 1024
now with all that done, let's actually try a copy
go to a dos prompt and check this out:
C:\Temp>pscp -scp FILE.CSV admin@HOSTNAMEORIPHERE:FILE.CSV1
Using keyboard-interactive authentication.
Password:
FILE.CSV | 0 kB | 0.7 kB/s | ETA: 00:00:00 | 100%
replace HOSTNAMEORIPHERE with your IP address and you will see how it all works.
So there you have it! easy way to copy without FTP! Great isn't it!
Cheers
Pete
Subscribe to:
Post Comments (Atom)
Popular old posts.
-
Hi Guys Having spent a lot of time with customers working on vPC deployments, I have found quite a few of the gotcha's for vPC that I w...
-
Hi Guys! This blog post is attempting to be the DEFINITIVE guide on Jumbo MTU, It's a topic that DOES MY HEAD IN! There are SO many ...
-
So some of the readers of this blog might already know this little trick, and what's more some of you might be surprised I didn't kn...
Childs Play
ReplyDeleteaaa authorization exec default local
ReplyDeleteis sometimes needed as well guys
Hi,
ReplyDeleteSCP port has to be enabled right. I mean i cud only telnet, ssh / snmp. Based out in india. Provdng managed service. Remotly ttshotng d device. Any other wy. i am preferably looking for Nexus switch.
Can we backup Running-Config & Startup-config with this ?
ReplyDeleteHow is it work ?
Just try :-)
DeleteC:\> pscp.exe -scp admin@172.19.20.101:running-config c:\somepath\running-config.txt
Using keyboard-interactive authentication.
Password: *********
running-config.txt | 16 kB | 16.6 kB/s | ETA: 00:00:00 | 100%
Fatal: Received unexpected end-of-file from server
Don't be alarmed by the "unexpected end-of-file from server"; I've been getting that error whenever i up- or downloaded a file from an IOS device with "ip scp server enabled" - I usually check MD5 checksums of IOS images transferred this way, and I never got an error.
Note:
user@host:/running-config will not work,
user@host:running-config will work
user@host:startup-config works,too.
hope that helps
Marc
I couldn't get this to work until I used a \ on the end;
Deletepscp -scp C:\xyz\file.bin me@router:\
every other combination resulted in "Fatal: Received unexpected end-of-file from server"
Good job Peter and thanks for the detailed info. For those of you who can already login to the device using ssh, here's a shorter version of the same thing:
ReplyDelete- RouterOrSwitch(config)#ip scp server enable
- C:\Temp>pscp -scp FILE.CSV admin@HOSTNAMEORIPHERE:FILE.CSV1
Thanks,
Roy.
Hey hi,
ReplyDeleteCan i use PSCP for copying a file from linux to cisco router in flash.
If we can, can you help me out. How can i do that ?
Thanks in advance.
Of course you can
DeleteTried this, but keep getting connection refused:C:\>pscp -scp "C:\Users\jgrant\Desktop\HSEC\isr4300-universalk9.03.16.01a.S.155
ReplyDelete-3.S1a-ext.SPA.bin" admin@10.16.11.110:\isr4300-universalk9.03.16.01a.S.155-3.S1
a-ext.SPA.bin
Fatal: Network error: Connection refused
If I adjust commands a little, and add a user ID and password, I get this:Access denied
DeleteUsing keyboard-interactive authentication.
password:
Access denied
Using keyboard-interactive authentication.
password:
Cách điều trị đau bao tử hiệu quả nhanh , cùng xem cách chữa loét hành tá tràng , triệu chứng viêm amidan , Hỏi đáp bệnh amidan hốc mủ cấp tính ,Dân gian thuốc chữa mề đay nổi đỏ , thuoc chua benh gan nhiem mo , đặc trị bệnh viêm phế quản phổi hiệu quả , Mẹo hay chua ho hieu qua thế nào ,Thời tiết bệnh viêm mũi dị ứng ,xông mũi chữa viêm xoang mãn tính dịch mủ, Thuốc dân gian chữa đau dạ dày cấp tính , bệnh trào ngược thực quản phổ biến ,Làm sao chữa trao nguoc da day thuc quan bằng đông y
ReplyDeleteThảo mộc tri rung toc nam nữ , phụ nữ mang thai mắc rối loạn kinh nguyệt có nguy hiểm không , mỏi xương khớp benh thoai hoa dot song co có chữa được không ,cách làm giảm bớt đau dạ dày tại nhà . công trình nghiên cứ cách chua viem gan b , bệnh viêm amidan thế nào để chữa bệnh viêm amidan , Cắt viêm amidan hốc mủ khó chịu , Bài thuốc chữa viêm đại tràng mãn tính . làm gì để kiêng bệnh đau dạ dày ăn gì cho nhanh khỏi . Khám phá ttriệu chứng bệnh đau dạ dày thế nào. đau rát viêm họng mãn tính chữa ra sao , Các mẹ cùng chua viem amidan o tre em đơn giản , chảy máu sau cắt viêm amidan kiêng ăn gì .
ReplyDeleteHạt đậu rồng chữa bệnh dạ dày .
Những triệu chứng bệnh viêm xoang .
Đông tây y hay thuốc dân gian chữa bệnh dạ dày tất cả đều hiệu quả . Mẩn ngứa mề đay ở người lớn và còn sảy ra benh me day o tre em nữa .
Are you presently worried about being cheated when buying Android App Store reviews/ratings? It’s factual that many people are offering-up incentives for clients just to rate apps. Such categories of reviews are tracked by Google. Provide us with an opportunity to help you with realistic reviews/ratings. buy app ratings
ReplyDeleteThis is horrific....Not of these suggestions work and it's way off point....Wasting my time...none of the questions were even answered..
ReplyDeletemake sure your user has privilege 15, eg:
ReplyDeleteusername transuser privilege 15 password hardtoguesspassword
Hey Pete, thanks for the article - I keep referring to it. FYI to get it working on our 3524's the exact string is:
ReplyDeletepscp.exe -scp c:\temp\n3500-uk9.6.0.2.A6.8.bin MyAAA-User@10.1.1.1:///n3500-uk9.6.0.2.A6.8.bin
As far as I know that is the best thing for me for now and it is so wanderful to know about that.
ReplyDeleteشركة نقل اثاث من الرياض الى الامارات
ReplyDeletefile transfer is very slow this way, and eventually get aborted
ReplyDeleteBelow is the error:-
c1100-ucmk9.16.10.2.SPA.b | 179512 kB | 80.1 kB/s | ETA: 00:49:22 | 43%FATAL ERROR: Network error: Network error: Software caused connection abort
Any solution for this, i already tried with tcp/ssh window size
شركة نقل اثاث من الرياض الى جدة
ReplyDeleteشركة نقل اثاث من الرياض الى جدة
adidas stan smith
ReplyDeletecheap air jordans
air jordan
golden goose superstar
golden goose mid star
lebron 16
supreme outlet
kd shoes
cheap jordans
curry 6