Sunteți pe pagina 1din 5

13 Jul

2015

how to manage les through SCP on Huawei


Posted in How To

SCP is a secure le transfer, based on SSH2.0, which supports downloading and uploading les between SCP client and server, in batches as well. If you
would like to know more, just visit Huawei support website. I will focus on practice and show this feature, using simple lab:

Con gure communication between loopback interfaces of the server and the client. Below the SCP_server as an example. As this is a simple topology, I
used RIP protocol for communication (long unused by me):
#
sysname SCP_server
#
vlan batch 100
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
rip 1
network 10.0.0.0
network 1.0.0.0
#

Con guration of SCP_server:

converted by Web2PDFConvert.com

[SCP_server]scp server enable


Info: Succeeded in starting the SCP server.
[SCP_server]rsa local-key-pair create
The key name will be: SCP_server_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
it will take a few minutes.
Input the bits in the modulus[default = 512]:
Generating keys...
.........++++++++++++
...................++++++++++++
.....++++++++
...................................................++++++++
SCP_server]user-interface vty 0 4
[SCP_server-ui-vty0-4]authentication-mode aaa
[SCP_server-ui-vty0-4]protocol inbound ssh
[SCP_server]aaa
[SCP_server-aaa]local-user labnario password cipher labnario
Info: Add a new user.
[SCP_server-aaa]local-user labnario service-type ssh
[SCP_server-aaa]local-user labnario privilege level 15
[SCP_server]ssh user labnario authentication-type password
Info: Succeeded in adding a new SSH user.
[SCP_server]ssh user labnario service-type all

Coniguration of SCP_client:
[SCP_client]scp client-source -a 2.2.2.2
[SCP_client]ssh client first-time enable

Let's check file system of SCP_server:


<SCP_server>dir
Directory of flash:/
Idx
0
1
2

Attr
drwdrw-rw-

Size(Byte)
1,909

Date
Time
Jul 13 2015 11:15:03
Jul 13 2015 11:15:14
Jul 13 2015 13:47:02

FileName
src
compatible
new_file.cfg

Now we can download the new_file.cfg from the remote SCP server:
[SCP_client]scp -a 2.2.2.2 -cipher 3des labnario@1.1.1.1:new_file.cfg new_file.cfg
Trying 1.1.1.1 ...
Press CTRL+K to abort
Connected to 1.1.1.1 ...
The server is not authenticated. Continue to access it? [Y/N] :y
Save the server's public key? [Y/N] :y
The server's public key will be saved with the name 1.1.1.1. Please wait...
Enter password:
new_file.cfg
new_file.cfg

0%
100%

0Bytes
1909Bytes

1Kb/s
2Kb/s

Let's check whether the file has been downloaded:


<SCP_client>dir
Directory of flash:/
Idx
0
1
2

Attr
drwdrw-rw-

Size(Byte)
1,909

Date
Time
Jul 13 2015 11:15:03
Jul 13 2015 11:15:14
Jul 13 2015 16:00:22

FileName
src
compatible
new_file.cfg

converted by Web2PDFConvert.com

Now we can rename this file and upload it to SCP server :


<SCP_client>rename new_file.cfg quite_new_file.cfg
Rename flash:/new_file.cfg to flash:/quite_new_file.cfg ?[Y/N]:y
Info: Rename file flash:/new_file.cfg to flash:/quite_new_file.cfg ......Done.
<SCP_client>system-view
Enter system view, return user view with Ctrl+Z.
[SCP_client]scp -a 2.2.2.2 -cipher 3des quite_new_file.cfg labnario@1.1.1.1:
Trying 1.1.1.1 ...
Press CTRL+K to abort
Connected to 1.1.1.1 ...
Enter password:
quite_new_file.cfg
quite_new_file.cfg

0%
100%

0Bytes
1909Bytes

1Kb/s
2Kb/s

And finally check the result on SCP server:


<SCP_server>dir
Directory of flash:/
Idx
0
1
2
2

Attr
drwdrw-rw-rw-

Size(Byte)
1,909
1,909

Date
Jul 13
Jul 13
Jul 13
Jul 13

2015
2015
2015
2015

Time
11:15:03
11:15:14
16:05:08
13:47:02

FileName
src
compatible
quite_new_file.cfg
new_file.cfg

Tags: Huawei S5700, SCP, secure transfer

converted by Web2PDFConvert.com

COMMENTS

Sort by Oldest First

Sort by Latest First

No comments found

LEAVE YOUR COMMENTS

Login to post a comment


Username

Password

Remember me

Register

Login

Forgot password

Post comment as a guest


Name (Required):

Email:

Website:

Your comments are subjected to administrator's moderation.


Agree to terms and condition.

Submit Comment

Powered by Komento

Categories
Basic Con guration
Cheat Sheets
converted by Web2PDFConvert.com

Command Line
Ethernet
FAQ
General
How To
IP Routing
IP Services
Multicast
QoS
Reliability
Security
System Management
VPN
WAN

Latest Posts
how to manage files through SCP on Huawei
Huawei eNSP - news
memory usage alarm threshold
from Huawei CLI - rollback configuration
NAT server on Huawei USG5500

Built with HTML5 and CSS3


- Copyright 2014 Labnario
Powered by Warp Theme Framework

converted by Web2PDFConvert.com

S-ar putea să vă placă și